Revert "Prevent props change from affecting local state"

This reverts commit f2bb8db12a.
pull/10616/head
Jared Scheib 2018-03-23 18:02:57 -07:00
parent 4c1e69a6d3
commit 0a1ddf7a8d
1 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,14 @@ class MultiSelectDropdown extends Component {
this.setState({isOpen: false})
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.selectedItems, nextProps.selectedItems)) {
return
}
this.setState({localSelectedItems: nextProps.selectedItems})
}
toggleMenu = e => {
e.stopPropagation()
this.setState({isOpen: !this.state.isOpen})