[arvados] updated: 2.7.0-6265-g0ddcae3222

git repository hosting git at public.arvados.org
Mon Apr 1 19:28:02 UTC 2024


Summary of changes:
 services/workbench2/src/components/data-explorer/data-explorer.tsx    | 4 +++-
 services/workbench2/src/store/data-explorer/data-explorer-reducer.ts  | 2 +-
 .../workbench2/src/views-components/data-explorer/data-explorer.tsx   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

       via  0ddcae3222d4e9682c10f33d1144105e939fd0ee (commit)
      from  7c0f74c303e04a0bdc65663ba9f9ef6adcc70b36 (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 0ddcae3222d4e9682c10f33d1144105e939fd0ee
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Apr 1 15:27:58 2024 -0400

    21364: loadmore button now disables if it cant load more 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 83a71ab509..13ad46286c 100644
--- a/services/workbench2/src/components/data-explorer/data-explorer.tsx
+++ b/services/workbench2/src/components/data-explorer/data-explorer.tsx
@@ -169,6 +169,7 @@ export const DataExplorer = withStyles(styles)(
                 setCheckedListOnStore,
                 checkedList,
                 working,
+                page,
             } = this.props;
             return (
                 <Paper
@@ -319,7 +320,8 @@ export const DataExplorer = withStyles(styles)(
                                             onClick={this.loadMore}
                                             variant="contained"
                                             color="primary"  
-                                            style={{width: '100%', margin: '10px'}} 
+                                            style={{width: '100%', margin: '10px'}}
+                                            disabled={ working || (page + 1) * rowsPerPage >= itemsAvailable || (itemsAvailable === 0 && page === 0)}
                                         >
                                             Load more
                                         </Button>
diff --git a/services/workbench2/src/store/data-explorer/data-explorer-reducer.ts b/services/workbench2/src/store/data-explorer/data-explorer-reducer.ts
index 2bc8caad36..41dca03b68 100644
--- a/services/workbench2/src/store/data-explorer/data-explorer-reducer.ts
+++ b/services/workbench2/src/store/data-explorer/data-explorer-reducer.ts
@@ -95,7 +95,7 @@ export const dataExplorerReducer = (
             update(state, id, (explorer) => ({
                 ...explorer,
                 items: state[id].items.concat(items),
-                itemsAvailable: state[id].itemsAvailable + itemsAvailable,
+                itemsAvailable: itemsAvailable,
                 page,
                 rowsPerPage,
             })),
diff --git a/services/workbench2/src/views-components/data-explorer/data-explorer.tsx b/services/workbench2/src/views-components/data-explorer/data-explorer.tsx
index 643949a20e..c2cea62a8b 100644
--- a/services/workbench2/src/views-components/data-explorer/data-explorer.tsx
+++ b/services/workbench2/src/views-components/data-explorer/data-explorer.tsx
@@ -23,7 +23,7 @@ interface Props {
 }
 
 const mapStateToProps = ({ progressIndicator, dataExplorer, router, multiselect, detailsPanel, properties}: RootState, { id }: Props) => {
-    const working = !!progressIndicator.some(p => p.id === id && p.working);
+    const working = !!progressIndicator.some(p => p.working);
     const dataExplorerState = getDataExplorer(dataExplorer, id);
     const currentRoute = router.location ? router.location.pathname : "";
     const isDetailsResourceChecked = multiselect.checkedList[detailsPanel.resourceUuid]

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list