Skip to content

Commit

Permalink
Fixing eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
carloslimasd committed Oct 31, 2024
1 parent 7dfb5d1 commit 203b073
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface DropdownComponent
Container: typeof DropdownContainer;
}

let Dropdown = (props: DropdownProps, ref: any) => {
const Dropdown: React.ForwardRefRenderFunction<unknown, DropdownProps> = (props, ref) => {
const {
aria = {},
autocomplete = false,
Expand Down Expand Up @@ -260,7 +260,8 @@ let Dropdown = (props: DropdownProps, ref: any) => {
<DropdownContainer>
{optionsWithBlankSelection &&
optionsWithBlankSelection?.map((option: GenericObject) => (
<Dropdown.Option key={option.id}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
<ForwardedDropdown.Option key={option.id}
option={option}
/>
))}
Expand All @@ -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;

0 comments on commit 203b073

Please sign in to comment.