diff --git a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx index f2a8c6122a..4fb3249629 100644 --- a/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +++ b/playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx @@ -47,7 +47,7 @@ interface DropdownComponent Container: typeof DropdownContainer; } -let Dropdown = (props: DropdownProps, ref: any) => { +const Dropdown: React.ForwardRefRenderFunction = (props, ref) => { const { aria = {}, autocomplete = false, @@ -260,7 +260,8 @@ let Dropdown = (props: DropdownProps, ref: any) => { {optionsWithBlankSelection && optionsWithBlankSelection?.map((option: GenericObject) => ( - ))} @@ -280,10 +281,10 @@ let Dropdown = (props: DropdownProps, ref: any) => { ) } -Dropdown = forwardRef(Dropdown) as DropdownComponent; -Dropdown.displayName = "Dropdown"; -Dropdown.Option = DropdownOption; -Dropdown.Trigger = DropdownTrigger; -Dropdown.Container = DropdownContainer; +const ForwardedDropdown = forwardRef(Dropdown) as DropdownComponent; +ForwardedDropdown.displayName = "Dropdown"; +ForwardedDropdown.Option = DropdownOption; +ForwardedDropdown.Trigger = DropdownTrigger; +ForwardedDropdown.Container = DropdownContainer; -export default Dropdown; +export default ForwardedDropdown;