Revert "Prevent props change from affecting local state"
This reverts commit f2bb8db12a
.
pull/10616/head
parent
4c1e69a6d3
commit
0a1ddf7a8d
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue