Merge branch '19275-Race-condition-in-search-bar-auto-suggest' into main
[arvados-workbench2.git] / src / views-components / search-bar / search-bar.tsx
index 6e8ec0813f594d8de246eac446eef19d08f30975..6a4d2a620e1fbf8ccd2cb3d4a209130cf75ce07e 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { connect } from 'react-redux';
-import { RootState } from '~/store/store';
+import { RootState } from 'store/store';
 import { Dispatch } from 'redux';
 import {
     goToView,
@@ -17,10 +17,10 @@ import {
     editSavedQuery,
     changeData,
     submitData, moveUp, moveDown, setAdvancedDataFromSearchValue, SEARCH_BAR_ADVANCED_FORM_NAME
-} from '~/store/search-bar/search-bar-actions';
-import { SearchBarView, SearchBarActionProps, SearchBarDataProps } from '~/views-components/search-bar/search-bar-view';
-import { SearchBarAdvancedFormData } from '~/models/search-bar';
-import { Vocabulary } from '~/models/vocabulary';
+} from 'store/search-bar/search-bar-actions';
+import { SearchBarView, SearchBarActionProps, SearchBarDataProps } from 'views-components/search-bar/search-bar-view';
+import { SearchBarAdvancedFormData } from 'models/search-bar';
+import { Vocabulary } from 'models/vocabulary';
 
 const mapStateToProps = ({ searchBar, form }: RootState): SearchBarDataProps => {
     return {
@@ -38,7 +38,7 @@ const mapStateToProps = ({ searchBar, form }: RootState): SearchBarDataProps =>
 };
 
 const mapDispatchToProps = (dispatch: Dispatch): SearchBarActionProps => ({
-    onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch)),
+    onSearch: (valueSearch: string) => dispatch<any>(searchData(valueSearch, true)),
     onChange: (event: React.ChangeEvent<HTMLInputElement>) => dispatch<any>(changeData(event.target.value)),
     onSetView: (currentView: string) => dispatch(goToView(currentView)),
     onSubmit: (event: React.FormEvent<HTMLFormElement>) => dispatch<any>(submitData(event)),