forked from RXNT/react-jsonschema-form-conditionals
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
ive found an issue with the form's onChange event not giving the id of the field that the user changed.
this is working when running a RJSForm
component but not when i use it with and applyRules.i know this package is not actively being worked on
but was hoping for clues to why this would not work, im happy to do a pr if its something that is definitely related to rjsf-conditionals and an easy enough fix
thanks again
edit: had a quick look at applyRules() and can see onChange gets handled locally,
then results are passed to the original onChange form prop
but omits the id prop
needs something like this i assume:
handleChange (formChange, id) {
const { formData } = formChange;
const { onChange } = this.props;
if (!deepEquals(formData, this.state.formData)) {
this.updateConf(formData, (newValues) => {
if (onChange) {
let updChange = Object.assign({}, formChange, newValues);
onChange(updChange, id);
}
});
} else {
onChange && onChange(formChange, id);
}
}
Metadata
Metadata
Assignees
Labels
No labels