-
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
OnChange specific field #2768
Comments
I'm also facing same issue. Any solutions to this? |
heath-freenome
added a commit
to heath-freenome/react-jsonschema-form
that referenced
this issue
Oct 3, 2022
- In @rjsf/utils, updated the `FieldProps` type for `onChange` to add an optional `id: string` parameter, making `onChange` for `FieldTemplateProps` use `FieldProps` definition - In @rjsf/core, updated the library to support returning an optional second parameter, `id: string`, to the `onChange()` prop on `Form` as follows: - Updated the `Form.onChange()` callback handler passed to all fields to take an optional third parameter, `id: string`, passing it out to the `onChange()` prop call - Updated `ArrayField` to make the callback returned from the `onChangeForIndex()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `MultiSchemaField` to make the `onOptionChange()` method pass along the `this.getFieldId()` value to the `props.onChange()` handler - Refactored the `id` logic for the select widget used in the `MultiSchemaField` into the `getFieldId()` method - Updated `ObjectField` to make the callback returned from the `onPropertyChange()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `SchemaField` to add a new `handleFieldComponentChange()` callback that ensures that an `id` is passed up the `onChange` callback chain - Updated the render of the `FieldComponent` to pass the `handleFieldComponentChange()` as the `onChange` handler - In @rjsf/playground, updated the `onFormDataChange` handler to log the `id` of the changed field if it is provided - Updated the `form-props.md` documentation to describe the new `id` parameter that may be returned - Updated the `CHANGELOG.md` accordingly
heath-freenome
added a commit
to heath-freenome/react-jsonschema-form
that referenced
this issue
Oct 3, 2022
- In @rjsf/utils, updated the `FieldProps` type for `onChange` to add an optional `id: string` parameter, making `onChange` for `FieldTemplateProps` use `FieldProps` definition - In @rjsf/core, updated the library to support returning an optional second parameter, `id: string`, to the `onChange()` prop on `Form` as follows: - Updated the `Form.onChange()` callback handler passed to all fields to take an optional third parameter, `id: string`, passing it out to the `onChange()` prop call - Updated `ArrayField` to make the callback returned from the `onChangeForIndex()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `MultiSchemaField` to make the `onOptionChange()` method pass along the `this.getFieldId()` value to the `props.onChange()` handler - Refactored the `id` logic for the select widget used in the `MultiSchemaField` into the `getFieldId()` method - Updated `ObjectField` to make the callback returned from the `onPropertyChange()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `SchemaField` to add a new `handleFieldComponentChange()` callback that ensures that an `id` is passed up the `onChange` callback chain - Updated the render of the `FieldComponent` to pass the `handleFieldComponentChange()` as the `onChange` handler - Updated all of the tests to check for the `id` in those situations when it is passed back - In @rjsf/playground, updated the `onFormDataChange` handler to log the `id` of the changed field if it is provided - Updated the `form-props.md` documentation to describe the new `id` parameter that may be returned - Updated the `CHANGELOG.md` accordingly
8 tasks
heath-freenome
added a commit
to heath-freenome/react-jsonschema-form
that referenced
this issue
Oct 3, 2022
- In @rjsf/utils, updated the `FieldProps` type for `onChange` to add an optional `id: string` parameter, making `onChange` for `FieldTemplateProps` use `FieldProps` definition - In @rjsf/core, updated the library to support returning an optional second parameter, `id: string`, to the `onChange()` prop on `Form` as follows: - Updated the `Form.onChange()` callback handler passed to all fields to take an optional third parameter, `id: string`, passing it out to the `onChange()` prop call - Updated `ArrayField` to make the callback returned from the `onChangeForIndex()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `MultiSchemaField` to make the `onOptionChange()` method pass along the `this.getFieldId()` value to the `props.onChange()` handler - Refactored the `id` logic for the select widget used in the `MultiSchemaField` into the `getFieldId()` method - Updated `ObjectField` to make the callback returned from the `onPropertyChange()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `SchemaField` to add a new `handleFieldComponentChange()` callback that ensures that an `id` is passed up the `onChange` callback chain - Updated the render of the `FieldComponent` to pass the `handleFieldComponentChange()` as the `onChange` handler - Updated all of the tests to check for the `id` in those situations when it is passed back - In @rjsf/playground, updated the `onFormDataChange` handler to log the `id` of the changed field if it is provided - Updated the `form-props.md` documentation to describe the new `id` parameter that may be returned - Updated the `CHANGELOG.md` accordingly
heath-freenome
added a commit
that referenced
this issue
Oct 3, 2022
- In @rjsf/utils, updated the `FieldProps` type for `onChange` to add an optional `id: string` parameter, making `onChange` for `FieldTemplateProps` use `FieldProps` definition - In @rjsf/core, updated the library to support returning an optional second parameter, `id: string`, to the `onChange()` prop on `Form` as follows: - Updated the `Form.onChange()` callback handler passed to all fields to take an optional third parameter, `id: string`, passing it out to the `onChange()` prop call - Updated `ArrayField` to make the callback returned from the `onChangeForIndex()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `MultiSchemaField` to make the `onOptionChange()` method pass along the `this.getFieldId()` value to the `props.onChange()` handler - Refactored the `id` logic for the select widget used in the `MultiSchemaField` into the `getFieldId()` method - Updated `ObjectField` to make the callback returned from the `onPropertyChange()` method take the additional `id` parameter and pass it along to the `props.onChange()` handler - Updated `SchemaField` to add a new `handleFieldComponentChange()` callback that ensures that an `id` is passed up the `onChange` callback chain - Updated the render of the `FieldComponent` to pass the `handleFieldComponentChange()` as the `onChange` handler - Updated all of the tests to check for the `id` in those situations when it is passed back - In @rjsf/playground, updated the `onFormDataChange` handler to log the `id` of the changed field if it is provided - Updated the `form-props.md` documentation to describe the new `id` parameter that may be returned - Updated the `CHANGELOG.md` accordingly
How to get the object of the sub-scheme in which it is located by id? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Prerequisites
Is there a way to know with the onChange callback, which field has been updated ?
This is taken from the following issue #981
This is to know if they found any solution for this type of requirement.
Thank you.
The text was updated successfully, but these errors were encountered: