Skip to content

Commit

Permalink
fix(fuselage): hidden select should be child of trigger (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti authored Jan 24, 2025
1 parent 31c7778 commit 6a6386a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-cycles-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/fuselage': patch
---

fix: `SelectAria` hidden select should be child of trigger
14 changes: 7 additions & 7 deletions packages/fuselage/src/components/Select/SelectAria.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ export const SelectAria = forwardRef(function SelectAria<T extends object>(

return (
<>
<HiddenSelect
state={state}
triggerRef={ref}
label={props.label}
name={props.name}
isDisabled={isDisabled}
/>
<SelectTrigger
{...mergeProps(focusProps, triggerProps)}
ref={mergedRef}
Expand All @@ -74,6 +67,13 @@ export const SelectAria = forwardRef(function SelectAria<T extends object>(
error={error}
id={id}
>
<HiddenSelect
state={state}
triggerRef={ref}
label={props.label}
name={props.name}
isDisabled={isDisabled}
/>
<Box
is='span'
color={state.selectedItem ? 'default' : 'hint'}
Expand Down

0 comments on commit 6a6386a

Please sign in to comment.