Create search-bar tests
[arvados-workbench2.git] / src / components / main-app-bar / search-bar / search-bar.tsx
index d8c7edeeafa525c0edf0b4640945d1219a3fd314..944eb426dcaa0d12b889f9ef3fb49235b6951393 100644 (file)
@@ -21,7 +21,7 @@ interface SearchBarState {
     value: string;
 }
 
-const DEFAULT_SEARCH_DEBOUNCE = 1000;
+export const DEFAULT_SEARCH_DEBOUNCE = 1000;
 
 class SearchBar extends React.Component<SearchBarProps> {
 
@@ -48,6 +48,10 @@ class SearchBar extends React.Component<SearchBarProps> {
         </Paper>
     }
 
+    componentDidMount() {
+        this.setState({value: this.props.value});
+    }
+
     componentWillReceiveProps(nextProps: SearchBarProps) {
         if (nextProps.value !== this.props.value) {
             this.setState({ value: nextProps.value });