feature/IO-3497-Ant-Design-v5-to-v6 - Checkpoint (Apollo)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { LoadingOutlined } from "@ant-design/icons";
|
||||
import { useLazyQuery } from "@apollo/client";
|
||||
import { useLazyQuery } from "@apollo/client/react";
|
||||
import { Empty, Select } from "antd";
|
||||
import _ from "lodash";
|
||||
import { forwardRef, useEffect, useState } from "react";
|
||||
@@ -22,14 +22,14 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||
|
||||
const handleSearch = (value) => {
|
||||
debouncedExecuteSearch({ variables: { search: value } });
|
||||
debouncedExecuteSearch({ search: value });
|
||||
};
|
||||
|
||||
const [option, setOption] = useState(value);
|
||||
|
||||
useEffect(() => {
|
||||
if (value === option && value) {
|
||||
callIdSearch({ variables: { id: value } });
|
||||
callIdSearch({ id: value });
|
||||
}
|
||||
}, [value, option, callIdSearch]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user