X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/1bbdd9c70d0099e0bf46b3c1ac55e423e3406314..a48138fa7227595bba0db267a4c37832cba9afa2:/src/views-components/data-explorer/data-explorer.tsx diff --git a/src/views-components/data-explorer/data-explorer.tsx b/src/views-components/data-explorer/data-explorer.tsx index 710d202d..371569d1 100644 --- a/src/views-components/data-explorer/data-explorer.tsx +++ b/src/views-components/data-explorer/data-explorer.tsx @@ -15,7 +15,7 @@ import { DataTableFilters } from '~/components/data-table-filters/data-table-fil interface Props { id: string; onRowClick: (item: any) => void; - onContextMenu?: (event: React.MouseEvent, item: any) => void; + onContextMenu?: (event: React.MouseEvent, item: any, isAdmin?: boolean) => void; onRowDoubleClick: (item: any) => void; extractKey?: (item: any) => React.Key; } @@ -23,7 +23,9 @@ interface Props { const mapStateToProps = (state: RootState, { id }: Props) => { const progress = state.progressIndicator.find(p => p.id === id); const working = progress && progress.working; - return { ...getDataExplorer(state.dataExplorer, id), working }; + const currentRoute = state.router.location ? state.router.location.pathname : ''; + const currentItemUuid = currentRoute === '/workflows' ? state.properties.workflowPanelDetailsUuid : state.detailsPanel.resourceUuid; + return { ...getDataExplorer(state.dataExplorer, id), working, paperKey: currentRoute, currentItemUuid }; }; const mapDispatchToProps = () => { @@ -56,6 +58,10 @@ const mapDispatchToProps = () => { dispatch(dataExplorerActions.SET_ROWS_PER_PAGE({ id, rowsPerPage })); }, + onLoadMore: (page: number) => { + dispatch(dataExplorerActions.SET_PAGE({ id, page })); + }, + onRowClick, onRowDoubleClick,