From 604d00da905e452b959b57edbfc83f275eb7e136 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 23 Dec 2022 21:19:23 -0800 Subject: [PATCH] Add back ref for Selects --- components/Select/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/Select/index.tsx b/components/Select/index.tsx index cf6e244a..7cc4bc69 100644 --- a/components/Select/index.tsx +++ b/components/Select/index.tsx @@ -20,7 +20,10 @@ interface Props triggerClass?: string } -const Select = (props: Props) => { +const Select = React.forwardRef(function input( + props: Props, + forwardedRef +) { const [value, setValue] = useState('') useEffect(() => { @@ -41,6 +44,7 @@ const Select = (props: Props) => { @@ -61,6 +65,6 @@ const Select = (props: Props) => { ) -} +}) export default Select