diff --git a/MultiSelect.js b/MultiSelect.js index f24f61f..d057b3e 100644 --- a/MultiSelect.js +++ b/MultiSelect.js @@ -26,11 +26,13 @@ class MultiSelect extends Component { } } - shouldComponentUpdate(nextProps) { + shouldComponentUpdate(nextProps, nextState) { // This is a performance check as this sometimes gets updated often - if (nextProps.selectedOptions.length === this.props.selectedOptions.length) { + if (nextProps.selectedOptions === this.props.selectedOptions && + nextState.selectedRows === this.state.selectedRows) { return false; } + return true; } diff --git a/README.md b/README.md index 6f28e3d..dead1b9 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ list. A React Native style object, you can also pass StyleSheet styles to this; they will be flattened. -## `listViewProps{}` +### `listViewProps{}` An object of props that are given to the ListView, this for things like `renderHeader` ### `activeOpacity` `Number`