Skip to content
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

Merged
merged 6 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.

-->

## @rjsf/utils
- Fix data type in `FieldTemplateProps['onChange']`


Copy link
Member

@heath-freenome heath-freenome Oct 5, 2023

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']`

Copy link
Contributor Author

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.

# 5.13.1

## @rjsf/utils
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export type FieldTemplateProps<T = any, S extends StrictRJSFSchema = RJSFSchema,
/** The formData for this field */
formData?: T;
/** The value change event handler; Can be called with a new value to change the value for this field */
onChange: FieldProps['onChange'];
onChange: FieldProps<T, S, F>['onChange'];
/** The key change event handler; Called when the key associated with a field is changed for an additionalProperty */
onKeyChange: (value: string) => () => void;
/** The property drop/removal event handler; Called when a field is removed in an additionalProperty context */
Expand Down