Skip to content

Commit

Permalink
Pass data-portal-for attr to list in portal (#801)
Browse files Browse the repository at this point in the history
* add data id to portal

* changesets

* pass id to dynamic combobox attr
  • Loading branch information
Cloud11PL committed May 16, 2024
1 parent a416d01 commit 65a8f3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-brooms-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saleor/macaw-ui": patch
---

ID passed to comobobox will now be passed as an attribute to dropdown list wrapper box
1 change: 1 addition & 0 deletions src/components/Combobox/Dynamic/DynamicCombobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const DynamicComboboxInner = <T extends Option>(
showEmptyState: hasNoOptions(children),
})}
className={listWrapperRecipe({ size })}
data-portal-for={id}
>
<List
as="ul"
Expand Down
1 change: 1 addition & 0 deletions src/components/Combobox/Static/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const ComboboxInner = <T extends Option, V extends Option | string>(
showEmptyState: hasNoOptions(children),
})}
className={listWrapperRecipe({ size })}
data-portal-for={id}
>
<List
as="ul"
Expand Down

0 comments on commit 65a8f3f

Please sign in to comment.