X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/98eba2bbc83b8d4bbce837f75924dbaed2664519..9eaee66663fa21962f46e301ba6257ab63a9b10c:/src/views/trash-panel/trash-panel.tsx diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx index e627f4f2..a0cf3e4f 100644 --- a/src/views/trash-panel/trash-panel.tsx +++ b/src/views/trash-panel/trash-panel.tsx @@ -64,7 +64,7 @@ export const ResourceRestore = return { resource, dispatch: props.dispatch }; })((props: { resource?: TrashableResource, dispatch?: Dispatch }) => - { + { if (props.resource && props.dispatch) { props.dispatch(toggleTrashed( props.resource.kind, @@ -72,8 +72,8 @@ export const ResourceRestore = props.resource.ownerUuid, props.resource.isTrashed )); - } - }}> + }}} + > @@ -155,23 +155,17 @@ export const TrashPanel = withStyles(styles)( }))( class extends React.Component { render() { - return this.hasAnyTrashedResources() - ? } /> - : ; - } - - hasAnyTrashedResources = () => { - // TODO: implement check if there is anything in the trash, - // without taking pagination into the account - return true; + return + } />; } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => { @@ -186,6 +180,7 @@ export const TrashPanel = withStyles(styles)( menuKind: ContextMenuKind.TRASH })); } + this.props.dispatch(loadDetailsPanel(resourceUuid)); } handleRowDoubleClick = (uuid: string) => {