[arvados] updated: 2.7.0-6054-gae1702814a
git repository hosting
git at public.arvados.org
Wed Mar 20 18:54:13 UTC 2024
Summary of changes:
.../src/components/data-explorer/data-explorer.tsx | 12 +++++++++---
services/workbench2/src/components/data-table/data-table.tsx | 7 +++++--
2 files changed, 14 insertions(+), 5 deletions(-)
via ae1702814a5d0b6b505d1d225ba47fd4afd32cb6 (commit)
from 5f7299e677a453c3fa9b278d29a132e74c9aca6d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ae1702814a5d0b6b505d1d225ba47fd4afd32cb6
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Mar 20 14:53:57 2024 -0400
21224: toolbar now toggles between details card and data explorer Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/services/workbench2/src/components/data-explorer/data-explorer.tsx b/services/workbench2/src/components/data-explorer/data-explorer.tsx
index b9816721f9..c2d8214fe9 100644
--- a/services/workbench2/src/components/data-explorer/data-explorer.tsx
+++ b/services/workbench2/src/components/data-explorer/data-explorer.tsx
@@ -128,10 +128,11 @@ export const DataExplorer = withStyles(styles)(
showLoading: false,
prevRefresh: "",
prevRoute: "",
+ msToolbarInDetailsCard: false,
};
multiSelectToolbarInTitle = !this.props.title && !this.props.progressBar;
-
+
componentDidUpdate(prevProps: DataExplorerProps<T>) {
const currentRefresh = this.props.currentRefresh || "";
const currentRoute = this.props.currentRoute || "";
@@ -158,6 +159,11 @@ export const DataExplorer = withStyles(styles)(
showLoading: false,
});
}
+ if (this.props.selectedResourceUuid !== prevProps.selectedResourceUuid) {
+ this.setState({
+ msToolbarInDetailsCard: this.props.selectedResourceUuid === this.props.currentRouteUuid,
+ });
+ }
}
componentDidMount() {
@@ -236,7 +242,7 @@ export const DataExplorer = withStyles(styles)(
</Grid>
)}
{!!progressBar && progressBar}
- {this.multiSelectToolbarInTitle && !!selectedResourceUuid && <MultiselectToolbar />}
+ {this.multiSelectToolbarInTitle && !this.state.msToolbarInDetailsCard && <MultiselectToolbar />}
{(!hideColumnSelector || !hideSearchInput || !!actions) && (
<Grid
className={classes.headerMenu}
@@ -302,7 +308,7 @@ export const DataExplorer = withStyles(styles)(
</Grid>
)}
</div>
- {!this.multiSelectToolbarInTitle && !!selectedResourceUuid && <MultiselectToolbar />}
+ {!this.multiSelectToolbarInTitle && <MultiselectToolbar />}
<Grid
item
xs="auto"
diff --git a/services/workbench2/src/components/data-table/data-table.tsx b/services/workbench2/src/components/data-table/data-table.tsx
index 1335bdf398..6e632e071a 100644
--- a/services/workbench2/src/components/data-table/data-table.tsx
+++ b/services/workbench2/src/components/data-table/data-table.tsx
@@ -56,7 +56,7 @@ export interface DataTableDataProps<I> {
currentRouteUuid: string;
checkedList: TCheckedList;
selectedResourceUuid: string;
- setSelectedUuid: (uuid: string) => void;
+ setSelectedUuid: (uuid: string | null) => void;
}
type CssRules =
@@ -178,9 +178,12 @@ export const DataTable = withStyles(styles)(
if (singleSelected && singleSelected !== isExactlyOneSelected(prevProps.checkedList)) {
this.props.setSelectedUuid(singleSelected);
}
- if (!singleSelected && !!currentRouteUuid) {
+ if (!singleSelected && !!currentRouteUuid && !this.isAnySelected()) {
this.props.setSelectedUuid(currentRouteUuid);
}
+ if (!singleSelected && this.isAnySelected()) {
+ this.props.setSelectedUuid(null);
+ }
}
componentWillUnmount(): void {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list