feature/IO-3544-Ant-Select-Deprecation - finish
This commit is contained in:
@@ -9,8 +9,6 @@ import {
|
||||
} from "../../graphql/vehicles.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
|
||||
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_VEHICLES_FOR_AUTOCOMPLETE);
|
||||
|
||||
@@ -73,15 +71,12 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
|
||||
onSelect={handleSelect}
|
||||
notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
|
||||
onBlur={onBlur}
|
||||
>
|
||||
{theOptions
|
||||
? theOptions.map((o) => (
|
||||
<Option key={o.id} value={o.id}>
|
||||
{`${o.v_vin || ""} ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""} `}
|
||||
</Option>
|
||||
))
|
||||
: null}
|
||||
</Select>
|
||||
options={theOptions?.map((o) => ({
|
||||
key: o.id,
|
||||
value: o.id,
|
||||
label: `${o.v_vin || ""} ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""} `
|
||||
}))}
|
||||
/>
|
||||
{idLoading || loading ? <LoadingOutlined /> : null}
|
||||
{error ? <AlertComponent title={error.message} type="error" /> : null}
|
||||
{idError ? <AlertComponent title={idError.message} type="error" /> : null}
|
||||
|
||||
Reference in New Issue
Block a user