Skip to content

Commit

Permalink
Select: pass form attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Sep 26, 2024
1 parent 289c6f2 commit 67a7f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .yarn/versions/f24f9512.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@radix-ui/react-select": patch
2 changes: 1 addition & 1 deletion packages/react/select/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const Select: React.FC<SelectProps> = (props: ScopedProps<SelectProps>) => {
const triggerPointerDownPosRef = React.useRef<{ x: number; y: number } | null>(null);

// We set this to true by default so that events bubble to forms without JS (SSR)
const isFormControl = trigger ? (Boolean(trigger.closest('form')) || form) : true;
const isFormControl = trigger ? Boolean(trigger.closest('form')) || form : true;
const [nativeOptionsSet, setNativeOptionsSet] = React.useState(new Set<NativeOption>());

// The native `select` only associates the correct default value if the corresponding
Expand Down

0 comments on commit 67a7f21

Please sign in to comment.