fix(dashboard,ui): Fixes to Combobox and CategoryCombobox (#9537)

**What**
- Fixes the Combobox to keep the width of the content constant.
- Brings CategoryCombobox inline with the other Combobox component
- Adds keyboard navigation to the CategoryCombobox: You can now navigate options using ArrowUp and ArrowDown, and if an option has children you can use ArrowRight to see the children options.
- Add "outline-none" to the Drawer component to stop it from flashing whenever focus is dropped.
- Removes a dependency that was added to the UI package by mistake

Resolves CC-155
This commit is contained in:
Kasper Fabricius Kristensen
2024-10-12 14:46:32 +00:00
committed by GitHub
parent 93b38bf47b
commit 1f682daf5c
8 changed files with 1323 additions and 1765 deletions
@@ -76,13 +76,13 @@ export const useComboboxData = <
*/
const disabled = !rest.isPending && !options.length && !searchValue
// // make sure that the default value is included in the option, if its not in options already
if (
defaultValue &&
defaultOptions.length &&
!options.find((o) => o.value === defaultValue)
) {
options.unshift(defaultOptions[0])
// make sure that the default value is included in the options
if (defaultValue && defaultOptions.length && !searchValue) {
defaultOptions.forEach((option) => {
if (!options.find((o) => o.value === option.value)) {
options.unshift(option)
}
})
}
return {