diff --git a/src/components/search/simple/SimpleSearchComponent.tsx b/src/components/search/simple/SimpleSearchComponent.tsx index a2daf8c7e..8759821a1 100644 --- a/src/components/search/simple/SimpleSearchComponent.tsx +++ b/src/components/search/simple/SimpleSearchComponent.tsx @@ -51,8 +51,10 @@ export default class SimpleSearchComponent extends React.Component } public componentDidUpdate(prevProps: Readonly, prevState: Readonly, snapshot?: any) { - if (this.props.searchText !== this.state.searchText) { - this.setState({searchText: this.props.searchText}, () => this.props.onChange(this.props.searchText)); + const { searchText } = this.props; + // If prop has changed and component is not aware, use prop for search input + if ((searchText !== prevProps.searchText) && (searchText !== this.state.searchText)) { + this.setState({searchText}, () => this.props.onChange(searchText)); } }