Skip to content

Commit

Permalink
Reset checked items state upon prop update
Browse files Browse the repository at this point in the history
  • Loading branch information
bregenspan committed Sep 25, 2019
1 parent d6aa7e8 commit a4a344c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/components/CheckboxList.jsx
Expand Up @@ -33,6 +33,8 @@ export default class CheckboxList extends PureComponent {
this.setState({checkedItems});
this.informAboutChange(checkedItems);
}
} else if (newProps.checkedItems !== this.props.checkedItems) {
this.setState({checkedItems: newProps.checkedItems});
}
}

Expand Down

0 comments on commit a4a344c

Please sign in to comment.