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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user