19302: fixed duplicated expand Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox...
[arvados-workbench2.git] / src / store / favorite-panel / favorite-panel-action.ts
index 48dd19ccde79ed78d06abac6152b2a7136dcb3d6..85ede867044d2d4bccd1340283f0a735b7391139 100644 (file)
@@ -2,7 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { Dispatch } from "redux";
 import { bindDataExplorerActions } from "../data-explorer/data-explorer-action";
-import { FavoritePanelMiddlewareService } from "./favorite-panel-middleware-service";
 
-export const favoritePanelActions = bindDataExplorerActions(FavoritePanelMiddlewareService.getInstance());
+export const FAVORITE_PANEL_ID = "favoritePanel";
+export const favoritePanelActions = bindDataExplorerActions(FAVORITE_PANEL_ID);
+
+export const loadFavoritePanel = () => (dispatch: Dispatch) => {
+    dispatch(favoritePanelActions.RESET_EXPLORER_SEARCH_VALUE());
+    dispatch(favoritePanelActions.REQUEST_ITEMS());
+};
\ No newline at end of file