feature/IO-3499-React-19: Remove redundant forward refs in favor of React 19 built in ref prop
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { useQuery } from "@apollo/client/react";
|
||||
import { Select } from "antd";
|
||||
import { forwardRef } from "react";
|
||||
import { QUERY_TEAMS } from "../../graphql/employee_teams.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
|
||||
//To be used as a form element only.
|
||||
|
||||
const EmployeeTeamSearchSelect = ({ ...props }) => {
|
||||
const EmployeeTeamSearchSelect = ({ ref, ...props }) => {
|
||||
const { loading, error, data } = useQuery(QUERY_TEAMS);
|
||||
|
||||
if (error) return <AlertComponent title={JSON.stringify(error)} type="error" />;
|
||||
return (
|
||||
<Select
|
||||
ref={ref}
|
||||
showSearch
|
||||
allowClear
|
||||
loading={loading}
|
||||
@@ -30,4 +30,4 @@ const EmployeeTeamSearchSelect = ({ ...props }) => {
|
||||
/>
|
||||
);
|
||||
};
|
||||
export default forwardRef(EmployeeTeamSearchSelect);
|
||||
export default EmployeeTeamSearchSelect;
|
||||
|
||||
Reference in New Issue
Block a user