-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix data type in FieldTemplateProps['onChange']
#3873
Conversation
…ange']` Co-authored-by: Nick Grosenbacher <nickgrosenbacher@gmail.com>
@aularon Good catch! Thanks for the fix. Can you resolve the conflict in |
@heath-freenome Done. Happy to help! Thank you 🙏 |
CHANGELOG.md
Outdated
|
||
## @rjsf/utils | ||
- Fix data type in `FieldTemplateProps['onChange']` | ||
|
||
|
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.
You can just move this down under the @rjsf/utils
below in 5.13.1
since it has yet to be published... I.e.:
# 5.13.1
## @rjsf/utils
- Added `getOptionMatchingSimpleDiscriminator()` function
- `getMatchingOption` and `getClosestMatchingOption` now bypass `validator.isValid()` calls when simple discriminator is provided, fixing [#3692](https://github.com/rjsf-team/react-jsonschema-form/issues/3692)
- Fix data type in `FieldTemplateProps['onChange']`
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.
I thought it was already published! Fixed now.
Reasons for making this change
Typing is not passed on, so even if we have a type (
<T>
) onFieldTemplateProps
, itsonChange
method is typed to haveany
as first argument, which is incorrect. This fixes it.Checklist
npm run test:update
to update snapshots, if needed.