Skip to content

Commit

Permalink
[PBNTR-633] Fixing parsing kits props (#3857)
Browse files Browse the repository at this point in the history
**What does this PR do?** 
Fixing parsing kits props

**How to test?** Steps to confirm the desired behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See addition/change


#### Checklist:
- [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new
kit`, `deprecated`, or `breaking`. See [Changelog &
Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels)
for details.
- [x] **DEPLOY** I have added the `milano` label to show I'm ready for a
review.
- [ ] **TESTS** I have added test coverage to my code.
  • Loading branch information
carloslimasd authored Nov 7, 2024
1 parent b0e3077 commit c69799d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 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;
}

const Dropdown = forwardRef((props: DropdownProps, ref: any) => {
let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
const {
aria = {},
autocomplete = false,
Expand Down Expand Up @@ -260,7 +260,7 @@ const Dropdown = forwardRef((props: DropdownProps, ref: any) => {
<DropdownContainer>
{optionsWithBlankSelection &&
optionsWithBlankSelection?.map((option: GenericObject) => (
<Dropdown.Option key={option.id}
<DropdownOption key={option.id}
option={option}
/>
))}
Expand All @@ -278,11 +278,12 @@ const Dropdown = forwardRef((props: DropdownProps, ref: any) => {
</DropdownContext.Provider>
</div>
)
}) as DropdownComponent
}

Dropdown.displayName = "Dropdown";
Dropdown.Option = DropdownOption;
Dropdown.Trigger = DropdownTrigger;
Dropdown.Container = DropdownContainer;
Dropdown = forwardRef(Dropdown) as unknown as DropdownComponent;
(Dropdown as DropdownComponent).displayName = "Dropdown";
(Dropdown as DropdownComponent).Option = DropdownOption;
(Dropdown as DropdownComponent).Trigger = DropdownTrigger;
(Dropdown as DropdownComponent).Container = DropdownContainer;

export default Dropdown;

0 comments on commit c69799d

Please sign in to comment.