[bugfix] only filterable columns should show up in FilterBox list (#3105)

* [bugfix] only filterable columns should show up in FilterBox list

* Touchups
This commit is contained in:
Maxime Beauchemin
2017-07-25 20:50:41 -07:00
committed by GitHub
parent 49ab09101b
commit 95509f2000
5 changed files with 24 additions and 8 deletions

View File

@@ -43,7 +43,8 @@ export default class SelectControl extends React.PureComponent {
this.onChange = this.onChange.bind(this);
}
componentWillReceiveProps(nextProps) {
if (nextProps.choices !== this.props.choices) {
if (nextProps.choices !== this.props.choices ||
nextProps.options !== this.props.options) {
const options = this.getOptions(nextProps);
this.setState({ options });
}