From bdd1f53ff9b78f0dfd323b9a7d0ad5a961219dc8 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 15 Jul 2020 11:12:30 -0700 Subject: [PATCH] Fixed forward reference issue caused by new Antd version. --- .../invoice-line-search-select.component.jsx | 16 ++++++-------- .../job-search-select.component.jsx | 22 ++++++++----------- .../vendor-search-select.component.jsx | 16 ++++++-------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx b/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx index 8cb0613c4..86e73bb72 100644 --- a/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx +++ b/client/src/components/invoice-line-search-select/invoice-line-search-select.component.jsx @@ -1,17 +1,14 @@ import { Select, Row, Col, Tag } from "antd"; -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, forwardRef } from "react"; import { useTranslation } from "react-i18next"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; //To be used as a form element only. const { Option } = Select; -const InvoiceLineSearchSelect = ({ - value, - onChange, - options, - onBlur, - onSelect, -}) => { +const InvoiceLineSearchSelect = ( + { value, onChange, options, onBlur, onSelect }, + ref +) => { const [option, setOption] = useState(value); const { t } = useTranslation(); @@ -23,6 +20,7 @@ const InvoiceLineSearchSelect = ({ return ( + optionFilterProp='children' + onBlur={onBlur}> {options ? options.map((o) => (