Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix(ui): keep theme selection inside profile menu (#7218)

Thomas07f2e0181bf7
diff --git a/packages/ui/src/components/color-scheme-combobox.tsx b/packages/ui/src/components/color-scheme-combobox.tsx
index 6e979e63d..24caffe58 100644
--- a/packages/ui/src/components/color-scheme-combobox.tsx
+++ b/packages/ui/src/components/color-scheme-combobox.tsx
@@ -28,12 +28,13 @@ export const ColorSchemeCombobox = ({ label, value, onChange, width }: ColorSche
return (
<Combobox
store={combobox}
+ withinPortal={false}
onOptionSubmit={(nextValue) => {
onChange(nextValue as ColorScheme);
combobox.closeDropdown();
}}
>
- <Combobox.Target>
+ <Combobox.Target targetType="button" withExpandedAttribute>
<InputBase
component="button"
type="button"
@@ -42,6 +43,11 @@ export const ColorSchemeCombobox = ({ label, value, onChange, width }: ColorSche
rightSection={<Combobox.Chevron />}
rightSectionPointerEvents="none"
onClick={() => combobox.toggleDropdown()}
+ onKeyDown={(event) => {
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
+ event.stopPropagation();
+ }
+ }}
variant="filled"
w={width}
>