Redirect to select option creation when no result (#14460)

fix:Ability to add a new option for a multi-select on the fly 
Issues:#13877

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
ANIMESH DUTTA
2025-10-07 20:09:48 +05:30
committed by GitHub
parent 2445668e96
commit 9c8e0f628e
13 changed files with 242 additions and 17 deletions
@@ -14,6 +14,7 @@ type SelectInputProps = {
onFilterChange?: ((filteredOptions: SelectOption[]) => void) | undefined;
onClear?: (() => void) | undefined;
clearLabel?: string;
onAddSelectOption?: (optionName: string) => void;
};
export const SelectInput = ({
@@ -27,6 +28,7 @@ export const SelectInput = ({
onFilterChange,
onClear,
clearLabel,
onAddSelectOption,
}: SelectInputProps) => {
return (
<SelectableList
@@ -43,6 +45,7 @@ export const SelectInput = ({
onClear={onClear}
clearLabel={clearLabel}
focusId={focusId}
onAddSelectOption={onAddSelectOption}
/>
</SelectableList>
);