diff --git a/app/javascript/components/ComboBox.tsx b/app/javascript/components/ComboBox.tsx index 3187a494a5d..1ee7cb28ae1 100644 --- a/app/javascript/components/ComboBox.tsx +++ b/app/javascript/components/ComboBox.tsx @@ -79,6 +79,7 @@ export function ComboBox({ ariaLabelledbyPrefix, description, className, + inputId, inputRef, isLoading, isOpen, @@ -86,6 +87,7 @@ export function ComboBox({ items, ...props }: ComboBoxProps & { + inputId?: string; inputRef?: RefObject; isOpen?: boolean; placeholder?: string; @@ -119,6 +121,7 @@ export function ComboBox({ ) : null}
= AriaSelectProps< items?: Item[]; sections?: Section[]; value: M extends 'single' ? string | null : string[]; + label?: string; + description?: string; + triggerId?: string; labelId?: string; ariaLabelledbyPrefix?: string; alwaysShowKey?: string; @@ -51,6 +56,9 @@ type AutocompleteFilter = NonNullable['filter']>; function Select({ items, sections, + label, + description, + triggerId, labelId, ariaLabelledbyPrefix, alwaysShowKey, @@ -77,12 +85,22 @@ function Select({ return ( + {label ? ( + + ) : null} {props.selectionMode == 'single' ? ( - ) : ( - + )} ({ ); } -function MultipleSelectValue() { +function MultipleSelectValue({ triggerId }: { triggerId?: string }) { const selectButtonRef = useRef(null); return ( > {({ selectedItems, state, defaultChildren }) => ( <> -