Skip to content

Commit

Permalink
fix(Select): ensure that options receive correct data testing attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Dec 21, 2023
1 parent 482fc91 commit ce8401c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ export function Select({
? items.map((item, ix) => (
<SelectItem
id={id}
data-cy={data?.cy}
data-test={data?.test}
data={item.data}
key={ix}
size={size}
{...item}
Expand Down Expand Up @@ -317,7 +316,13 @@ const SelectGroup = ({
{label}
</RadixSelect.Label>
{items.map((item, ix) => (
<SelectItem key={ix} size={size} {...item} className={className} />
<SelectItem
key={ix}
size={size}
data={item.data}
{...item}
className={className}
/>
))}
</RadixSelect.Group>
</>
Expand Down

0 comments on commit ce8401c

Please sign in to comment.