-
-
Notifications
You must be signed in to change notification settings - Fork 295
[combobox][select] Respect itemToStringValue for onFormSubmit
#3441
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
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
LukasTy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. 👍
Even though there might be cases where having the full object could be useful, those should be a minority. 👌
| controlRef, | ||
| name, | ||
| getValue: () => value, | ||
| getValue: () => fieldStringValue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we only use fieldStringValue inside this callback, does it make sense to compute it lazily?
Or is it used frequently enough to always compute it in the render?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value/getValue are distinct for the useField hook
Fixes object values with
<Form onFormSubmit>passing the plain object instead of the stringified form value