From 8561a2a88b983b574eedab399a3e05c01fc5fc37 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Thu, 17 Aug 2017 16:11:34 +0530 Subject: [PATCH] =?UTF-8?q?Github=20issue#1127,=20Checkbox=20group=20type?= =?UTF-8?q?=20questions=20not=20removing=20unselected=20items=20=E2=80=94?= =?UTF-8?q?=20Fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/components/ProjectWizard.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index b1b4c7709..a3e47990c 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -235,7 +235,14 @@ class ProjectWizard extends Component { const { onProjectUpdate } = this.props this.setState({ // update only dirtyProject when Form changes the model - dirtyProject: _.merge({}, this.state.dirtyProject, unflatten(change)), + dirtyProject: _.mergeWith({}, this.state.dirtyProject, unflatten(change), + // customizer to override array value with changed values + (objValue, srcValue, key) => { + if (_.isArray(srcValue)) { + return srcValue// srcValue contains the changed values from action payload + } + } + ), isProjectDirty: true }, () => { typeof onProjectUpdate === 'function' && onProjectUpdate(this.state.dirtyProject)