Revert "refactor(react): useDeferredValue"
This reverts commit cd4d7b5d36
.
This commit is contained in:
parent
668f5a70f5
commit
402d0dd3db
1 changed files with 3 additions and 7 deletions
|
@ -1,9 +1,5 @@
|
|||
import React, {
|
||||
useState,
|
||||
useRef,
|
||||
useDeferredValue,
|
||||
ChangeEventHandler
|
||||
} from 'react';
|
||||
import React, { useState, useRef, ChangeEventHandler } from 'react';
|
||||
import { useDebounce } from 'use-debounce';
|
||||
import { useQuery } from 'react-query';
|
||||
import {
|
||||
Combobox,
|
||||
|
@ -63,7 +59,7 @@ function ComboSearch<Result>({
|
|||
const [, setExternalId] = useHiddenField(group, 'external_id');
|
||||
const initialValue = externalValue ? externalValue : controlledValue;
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const debouncedSearchTerm = useDeferredValue(searchTerm);
|
||||
const [debouncedSearchTerm] = useDebounce(searchTerm, 300);
|
||||
const [value, setValue] = useState(initialValue);
|
||||
const resultsMap = useRef<
|
||||
Record<string, { key: string; value: string; result: Result }>
|
||||
|
|
Loading…
Reference in a new issue