-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Select enter on form #1196
Select enter on form #1196
Conversation
That's cool. I think we may not need this new property. The expected behavior is: as long as Enter is pressed when the select is focused, the form will not submit. |
Let us get this straight - not when select is focused, but when select is focused and has overlay visible. When select is focused and no overlay is visible, then enter should submit the form. |
Yes, when overlay is closed, the select exits the edit state. Then enter should submit the form. |
@ElderJames per request, the added functionality was removed in 6c5f8bc. |
…t-design-blazor#1196) * fix(module:select): enter behavior on form * fix(module:select): add DisableSubmitFormOnEnter attribute * fix(module:select): remove proposed DisableSubmitFormOnEnter
🤔 This is a ...
🔗 Related issue link
Fixes #1176
💡 Background and solution
Except fixes to #1176, this commit also adds the following:
DisableSubmitFormOnEnter
: Default behavior forSelect
component on aForm
is to submit on Enter. The exception is when Enter is pressed while select options are visible (then Enter will set picked option as the value). IfDisableSubmitFormOnEnter = true
then Enter will not submit on aForm
.Select
component (ifForm.ValidateOnChange == true
)Also, I can create a docs sample for
DisableSubmitFormOnEnter
behaviour based on this gif:📝 Changelog
☑️ Self Check before Merge