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 { Select, Space, Spin, Tag } from "antd";
|
||||
import _ from "lodash";
|
||||
import { forwardRef, useEffect, useState } from "react";
|
||||
@@ -29,22 +29,20 @@ const JobSearchSelect = (
|
||||
|
||||
const handleSearch = (value) => {
|
||||
debouncedExecuteSearch({
|
||||
variables: {
|
||||
search: value,
|
||||
...(convertedOnly || notExported
|
||||
? {
|
||||
...(convertedOnly ? { isConverted: true } : {}),
|
||||
...(notExported ? { notExported: true } : {}),
|
||||
...(notInvoiced ? { notInvoiced: true } : {})
|
||||
}
|
||||
: {})
|
||||
}
|
||||
search: value,
|
||||
...(convertedOnly || notExported
|
||||
? {
|
||||
...(convertedOnly ? { isConverted: true } : {}),
|
||||
...(notExported ? { notExported: true } : {}),
|
||||
...(notInvoiced ? { notInvoiced: true } : {})
|
||||
}
|
||||
: {})
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (restProps.value) {
|
||||
callIdSearch({ variables: { id: restProps.value } }); // Sometimes results in a no-op. Not sure how to fix.
|
||||
callIdSearch({ id: restProps.value }); // Sometimes results in a no-op. Not sure how to fix.
|
||||
}
|
||||
}, [restProps.value, callIdSearch]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user