Skip to content

Commit

Permalink
Refactor Select to use ListBoxSection (#504)
Browse files Browse the repository at this point in the history
* bump RAC to 1.5.0

* replace Section with ListBoxSection

* Revert "bump RAC to 1.5.0"

This reverts commit 75e05e7.

* Reapply "bump RAC to 1.5.0"

This reverts commit 0edc443.
  • Loading branch information
mkernohanbc authored Dec 11, 2024
1 parent cab8e45 commit 65e4f1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/react-components/src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
ListBox,
ListBoxItem,
ListBoxItemProps as ReactAriaListBoxItemProps,
ListBoxSection,
Popover,
Section,
Select as ReactAriaSelect,
SelectProps as ReactAriaSelectProps,
SelectValue,
Expand Down Expand Up @@ -124,7 +124,10 @@ export default function Select<T extends object>({
}
>
{(section: SelectionSectionProps) => (
<Section id={section.id} className="bcds-react-aria-Section">
<ListBoxSection
id={section.id}
className="bcds-react-aria-Section"
>
{section?.header && (
<Header className="bcds-react-aria-Select--Header">
{section.header}
Expand Down Expand Up @@ -168,7 +171,7 @@ export default function Select<T extends object>({
</ListBoxItem>
)}
</Collection>
</Section>
</ListBoxSection>
)}
</ListBox>
</Popover>
Expand Down

0 comments on commit 65e4f1a

Please sign in to comment.