ImEX and App Improvements.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import {useLazyQuery} from "@apollo/client";
|
||||
import {Select, Space, Tag} from "antd";
|
||||
import {Select, Space, Spin, Tag} from "antd";
|
||||
import _ from "lodash";
|
||||
import React, {forwardRef, useEffect, useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE,} from "../../graphql/jobs.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import {OwnerNameDisplayFunction} from "../owner-name-display/owner-name-display.component";
|
||||
import { SearchOutlined } from '@ant-design/icons';
|
||||
import { LoadingOutlined } from '@ant-design/icons';
|
||||
|
||||
const {Option} = Select;
|
||||
|
||||
@@ -31,7 +33,6 @@ const JobSearchSelect = (
|
||||
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
||||
|
||||
const executeSearch = (v) => {
|
||||
console.log(v);
|
||||
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
|
||||
callSearch(v);
|
||||
};
|
||||
@@ -77,14 +78,15 @@ const JobSearchSelect = (
|
||||
disabled={disabled}
|
||||
showSearch
|
||||
autoFocus
|
||||
allowClear
|
||||
allowClear={!loading}
|
||||
style={{
|
||||
width: "100%",
|
||||
}}
|
||||
filterOption={false}
|
||||
onSearch={handleSearch}
|
||||
loading={loading || idLoading}
|
||||
//notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
|
||||
//loading={loading || idLoading}
|
||||
suffixIcon={loading &&<Spin/>}
|
||||
notFoundContent={loading ? <LoadingOutlined /> : null}
|
||||
{...restProps}
|
||||
>
|
||||
{theOptions
|
||||
@@ -106,6 +108,7 @@ const JobSearchSelect = (
|
||||
))
|
||||
: null}
|
||||
</Select>
|
||||
|
||||
{error ? <AlertComponent message={error.message} type="error"/> : null}
|
||||
{idError ? (
|
||||
<AlertComponent message={idError.message} type="error"/>
|
||||
|
||||
Reference in New Issue
Block a user