[skip ci] update search customer on add and edit transferfee
This commit is contained in:
@ -9,7 +9,8 @@ import {
|
||||
KeenIcon,
|
||||
useDataGrid
|
||||
} from '@/components';
|
||||
import { useCallApi } from '@/hooks';3
|
||||
import { useCallApi } from '@/hooks';
|
||||
3;
|
||||
import {
|
||||
Dialog,
|
||||
DialogBody,
|
||||
@ -144,7 +145,6 @@ const resetForm = () => {
|
||||
const [showTransactionFeeDialog, setShowTransactionFeeDialog] = useState(false);
|
||||
const parsedUser = getAuth()?.user;
|
||||
|
||||
|
||||
const useDebounce = (value: string, delay: number) => {
|
||||
const [debouncedValue, setDebouncedValue] = useState(value);
|
||||
|
||||
@ -307,7 +307,6 @@ const debouncedCreditSearchTerm = useDebounce(creditSearchTerm, 500);
|
||||
}
|
||||
}, [debouncedDeductSearchTerm, openDeductOrigin, formField.deduct_from, searchDeductCustomers]);
|
||||
|
||||
|
||||
const searchCreditCustomers = useCallback(
|
||||
async (searchTerm: string) => {
|
||||
setIsSearchingCreditCustomers(true);
|
||||
@ -347,7 +346,12 @@ const debouncedCreditSearchTerm = useDebounce(creditSearchTerm, 500);
|
||||
if (openCreditDestination && formField.credit_to === 'I') {
|
||||
searchCreditCustomers(debouncedCreditSearchTerm);
|
||||
}
|
||||
}, [debouncedCreditSearchTerm, openCreditDestination, formField.credit_to, searchCreditCustomers]);
|
||||
}, [
|
||||
debouncedCreditSearchTerm,
|
||||
openCreditDestination,
|
||||
formField.credit_to,
|
||||
searchCreditCustomers
|
||||
]);
|
||||
|
||||
const doCreateTransferType = useCallback(
|
||||
async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
|
||||
@ -793,7 +793,6 @@ useEffect(() => {
|
||||
onChange={(e) => {
|
||||
const value = e.target.value;
|
||||
setDeductSearchTerm(value);
|
||||
|
||||
}}
|
||||
autoComplete="off"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
|
||||
Reference in New Issue
Block a user