19865: Reset search values on panel loading.
[arvados-workbench2.git] / src / store / public-favorites-panel / public-favorites-action.ts
index bc0fc3297d574630db28f515ff7cf32673fcad8b..6e36e1f8b92e2200536bf646f4e3a827a52ac234 100644 (file)
@@ -2,9 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { Dispatch } from "redux";
 import { bindDataExplorerActions } from "store/data-explorer/data-explorer-action";
 
 export const PUBLIC_FAVORITE_PANEL_ID = "publicFavoritePanel";
 export const publicFavoritePanelActions = bindDataExplorerActions(PUBLIC_FAVORITE_PANEL_ID);
 
-export const loadPublicFavoritePanel = () => publicFavoritePanelActions.REQUEST_ITEMS();
\ No newline at end of file
+export const loadPublicFavoritePanel = () => (dispatch: Dispatch) => {
+    dispatch(publicFavoritePanelActions.RESET_EXPLORER_SEARCH_VALUE());
+    dispatch(publicFavoritePanelActions.REQUEST_ITEMS());
+};
\ No newline at end of file