We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5351e4 commit a485391Copy full SHA for a485391
1 file changed
src/components/free-text-search/index.js
@@ -25,7 +25,7 @@ class FreeTextSearch extends React.Component {
25
this.onChange = this.onChange.bind(this);
26
27
this.state = {
28
- value: props.value,
+ value: props.value || "",
29
};
30
}
31
@@ -46,7 +46,7 @@ class FreeTextSearch extends React.Component {
46
this.setState({value: ''});
47
48
49
- doFiltering(term){
+ doFiltering(term = ""){
50
this.props.onSearch(term.trim());
51
52
@@ -95,6 +95,7 @@ class FreeTextSearch extends React.Component {
95
FreeTextSearch.defaultProps = {
96
preventEvents: false,
97
onChange: null,
98
+ value: "",
99
100
101
FreeTextSearch.propTypes = {
0 commit comments