You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{SelectasBaseSelect}from"@radix-ui/themes";exportconstSelect=React.forwardRef(({ value, onChange },ref)=>{return(<BaseSelect.Rootname={"complexity"}size={size}requiredvalue={value}onValueChange={onChange}>{/* Important to pass ref to Trigger */}<BaseSelect.Triggerref={ref}placeholder={'Select value'}/><BaseSelect.Content><BaseSelect.Itemvalue={"1"}>1</BaseSelect.Item><BaseSelect.Itemvalue={"2"}>2</BaseSelect.Item></BaseSelect.Content></BaseSelect.Root>);});
Validity State: if form is submit but select value is undefined - validity state should contain errors
Focus: select component should be focused if it is the first input with errors
Actual result:
Validity State*: it is always undefined
Focus: the "hidden" native select is focused instead of Radix component. If press space right after submit, it opens the native select (see difference between screenshots)
"hidden" select:
radix select:
also getting this warning on submit if select's value is undefined:
Blocked aria-hidden on a <select> element because the element that just received focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
The text was updated successfully, but these errors were encountered:
tuchk4
changed the title
Form validation + Select integration seems doen't work
Form validation + Select integration seems don't work
Aug 5, 2024
(simplified examples)
Select:
Form:
Expected result:
Actual result:
space
right after submit, it opens the native select (see difference between screenshots)"hidden" select:
radix select:
also getting this warning on submit if select's value is undefined:
The text was updated successfully, but these errors were encountered: