From 7874ced54b75179fc7e0ac2d51cf1e52a966721b Mon Sep 17 00:00:00 2001 From: ba Date: Fri, 1 Nov 2024 09:02:16 +1030 Subject: [PATCH] Update applyRules.js add id to handleChange function and pass along to rjsf onChange function prop --- src/applyRules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applyRules.js b/src/applyRules.js index afbcca68..4ce3c570 100644 --- a/src/applyRules.js +++ b/src/applyRules.js @@ -80,18 +80,18 @@ export class FormWithConditionals extends Component { * https://react-jsonschema-form.readthedocs.io/en/latest/#form-data-changes * @param formChange {Object} */ - handleChange (formChange) { + 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); + onChange(updChange, id); } }); } else { - onChange && onChange(formChange); + onChange && onChange(formChange, id); } }