|
@@ -49,7 +49,9 @@ function DebounceSelect<
|
|
|
}, [fetchOptions, debounceTimeout])
|
|
|
useEffect(() => {
|
|
|
if (!state.options?.length && state.val) {
|
|
|
- debounceFetcher({ ID: state.val })
|
|
|
+ fetchOptions({ ID: state.val }).then(newOptions => {
|
|
|
+ setState({ ...state, options: newOptions, fetching: false })
|
|
|
+ })
|
|
|
}
|
|
|
}, [state.val])
|
|
|
|