(react) add onSearchInputChange callback to searchable select

We want to be able to notify an event when the search term of the
searchable select gets updated.
This commit is contained in:
Nathan Vasse
2024-02-26 14:41:15 +01:00
committed by NathanVss
parent 680365a117
commit 04ab3306e2
8 changed files with 142 additions and 3 deletions

View File

@@ -93,6 +93,10 @@ export const SelectMonoSearchable = forwardRef<SelectHandle, SubProps>(
},
}));
useEffect(() => {
props.onSearchInputChange?.({ target: { value: inputFilter } });
}, [inputFilter]);
const onInputBlur = () => {
setHasInputFocused(false);
if (downshiftReturn.selectedItem) {