Add refreshing favorite list if top project was mark as favorite and favorite list...
authorDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 24 Jul 2018 11:08:24 +0000 (13:08 +0200)
committerDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 24 Jul 2018 11:08:24 +0000 (13:08 +0200)
Feature #13753

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>

src/views-components/context-menu/action-sets/favorite-action-set.ts
src/views-components/context-menu/action-sets/project-action-set.ts

index 807c30995631fb408d4480a65843fd0aa7cb5687..58cf6cce40ea4c04a7a8e4ad537cae2853f72abf 100644 (file)
@@ -11,7 +11,6 @@ import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel"
 export const favoriteActionSet: ContextMenuActionSet = [[{
     component: ToggleFavoriteAction,
     execute: (dispatch, resource) => {
-        debugger;
         dispatch<any>(toggleFavorite(resource)).then(() => {
             dispatch<any>(dataExplorerActions.REQUEST_ITEMS({ id : FAVORITE_PANEL_ID }));
         });
index e0a5e5412616a8690df6e5de1184e46cf201a275..efcc429c49af2c53a64424545b60c0b92c6eb017 100644 (file)
@@ -7,6 +7,8 @@ import { projectActions } from "../../../store/project/project-action";
 import { NewProjectIcon } from "../../../components/icon/icon";
 import { ToggleFavoriteAction } from "./favorite-action";
 import { toggleFavorite } from "../../../store/favorites/favorites-actions";
+import { dataExplorerActions } from "../../../store/data-explorer/data-explorer-action";
+import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel";
 
 export const projectActionSet: ContextMenuActionSet = [[{
     icon: NewProjectIcon,
@@ -17,6 +19,8 @@ export const projectActionSet: ContextMenuActionSet = [[{
 }, {
     component: ToggleFavoriteAction,
     execute: (dispatch, resource) => {
-        dispatch<any>(toggleFavorite(resource));
+        dispatch<any>(toggleFavorite(resource)).then(() => {
+            dispatch<any>(dataExplorerActions.REQUEST_ITEMS({ id : FAVORITE_PANEL_ID }));
+        });
     }
 }]];