Remove forwardRef

This commit is contained in:
Rihan 2022-12-13 22:50:36 +00:00 committed by GitHub
parent 0ee269c877
commit ca695b12a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,7 @@ interface DropdownProps {
options: Array<OptionItem>;
}
export const Dropdown = React.forwardRef<HTMLDivElement, DropdownProps>(
(props: DropdownProps) => (
export function Dropdown(props: DropdownProps) {
<div className="relative my-4 max-w-[18rem]">
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
{({ open }) => (
@ -56,6 +55,5 @@ export const Dropdown = React.forwardRef<HTMLDivElement, DropdownProps>(
</>
)}
</Listbox>
</div>
)
);
</div>;
}