From 13eaae7bc025eaf4765acea06b596ca88eb6ff05 Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Tue, 10 Jul 2018 14:46:45 +0200 Subject: [PATCH] Load details while navigating using tree or breadcrumbs Feature #13777 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/views/workbench/workbench.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx index fac96268..959025bf 100644 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@ -136,6 +136,7 @@ class Workbench extends React.Component { mainAppBarActions: MainAppBarActionProps = { onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => { this.props.dispatch(setProjectItem(itemId, ItemMode.BOTH)); + this.props.dispatch(loadDetails(itemId, ResourceKind.Project)); }, onSearch: searchText => { this.setState({ searchText }); @@ -190,7 +191,10 @@ class Workbench extends React.Component { this.props.dispatch(setProjectItem(itemId, ItemMode.OPEN))} - toggleActive={itemId => this.props.dispatch(setProjectItem(itemId, ItemMode.ACTIVE))} + toggleActive={itemId => { + this.props.dispatch(setProjectItem(itemId, ItemMode.ACTIVE)); + this.props.dispatch(loadDetails(itemId, ResourceKind.Project)); + }} /> } @@ -200,7 +204,7 @@ class Workbench extends React.Component { - + ); @@ -208,11 +212,12 @@ class Workbench extends React.Component { renderProjectPanel = (props: RouteComponentProps<{ id: string }>) => this.props.dispatch(setProjectItem(itemId, ItemMode.ACTIVE))} - onItemClick={item => { + onItemClick={item => { this.props.dispatch(loadDetails(item.uuid, item.kind as ResourceKind)); }} onItemDoubleClick={item => { this.props.dispatch(setProjectItem(item.uuid, ItemMode.ACTIVE)); + this.props.dispatch(loadDetails(item.uuid, ResourceKind.Project)); }} {...props} /> -- 2.30.2