Skip to content

Commit 099f4e5

Browse files
author
vikasrohit
authored
Merge pull request #1128 from appirio-tech/feature/checkbox-group-unselection-issue
Github issue#1127, Checkbox group type questions not removing unselected items
2 parents 197cfb7 + 8561a2a commit 099f4e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/projects/create/components/ProjectWizard.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,14 @@ class ProjectWizard extends Component {
235235
const { onProjectUpdate } = this.props
236236
this.setState({
237237
// update only dirtyProject when Form changes the model
238-
dirtyProject: _.merge({}, this.state.dirtyProject, unflatten(change)),
238+
dirtyProject: _.mergeWith({}, this.state.dirtyProject, unflatten(change),
239+
// customizer to override array value with changed values
240+
(objValue, srcValue, key) => {
241+
if (_.isArray(srcValue)) {
242+
return srcValue// srcValue contains the changed values from action payload
243+
}
244+
}
245+
),
239246
isProjectDirty: true
240247
}, () => {
241248
typeof onProjectUpdate === 'function' && onProjectUpdate(this.state.dirtyProject)

0 commit comments

Comments
 (0)