Skip to content

Commit

Permalink
[#3] Fix text filter menu entry not being shown
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-hadzic committed Nov 2, 2016
1 parent f0f0e18 commit bbc42ae
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ const propTypes = {
};

class Filter extends Component {
shouldComponentUpdate(nextProps) {
const { value, options } = this.props;
if (nextProps.value !== value || nextProps.options !== options) {
return true;
}
return false;
}

render() {
const {
value,
Expand All @@ -24,7 +32,10 @@ class Filter extends Component {
placeholder="Search by text or tags"
promptTextCreator={(txt) => `Search for '${txt}'`}
onChange={(selected) => onChange(selected)}
onInputChange={(text) => onTextChange(text)}
onInputChange={(text) => {
onTextChange(text);
return text;
}}
onBlurResetsInput={false}
onCloseResetsInput={false}
newOptionCreator={({ label }) => createTextFilter(label)}
Expand Down

0 comments on commit bbc42ae

Please sign in to comment.