-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[joy-ui][Select] Select renders hidden input even when the name
prop is not set
#39321
Comments
@Bestwebdesign How did you get this warning to show? I don't see anything in the console in the linked sandbox
🤔 I think it's a docs issue, the hidden input is always rendered |
@mj12albert The message is displayed in Chrome. |
I understand, but in my specific case I don't need the So when a
I tried adding
|
@Bestwebdesign You are right, the doc is confusing. We could do 2 things:
|
That would be great. However, I see it also affects other controls: Switch: https://2n9sk3.csb.app/ To permanently suppress this warning, all these inputs would need to get a random So I'm not sure what's better, add a random I also noticed that components like |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/s/mx2ty5?file=/Demo.js
Steps:
Select
component to find the hidden input without a name attribute.Current behavior 😯
Hidden input is rendered even when the
name
prop is not specified. Since the hidden input does not have a name attribute, it generates a warning in the console:Expected behavior 🤔
According to the documentation, hidden input should not be rendered when the
name
prop is not provided:https://mui.com/joy-ui/api/select/#Select-prop-name
Context 🔦
No response
Your environment 🌎
No response
The text was updated successfully, but these errors were encountered: