21364: changed button disable to track itemsAvailable.length Arvados-DCO-1.1-Signed...
[arvados.git] / services / workbench2 / src / components / data-explorer / data-explorer.tsx
index ba710bc783e9ca6368c5355d042a3930e677af8b..e29ff9c55ea121d86aa06db06795d81d8a309723 100644 (file)
@@ -169,6 +169,7 @@ export const DataExplorer = withStyles(styles)(
                 setCheckedListOnStore,
                 checkedList,
                 working,
+                page,
             } = this.props;
             return (
                 <Paper
@@ -294,7 +295,7 @@ export const DataExplorer = withStyles(styles)(
                             <Toolbar className={classes.footer}>
                                 {elementPath && (
                                     <Grid container>
-                                        <span data-cy="element-path">{elementPath}</span>
+                                        <span data-cy="element-path">{elementPath.length > 2 ? elementPath : ''}</span>
                                     </Grid>
                                 )}
                                 <Grid
@@ -315,9 +316,12 @@ export const DataExplorer = withStyles(styles)(
                                         />
                                     ) : (
                                         <Button
-                                            variant="text"
-                                            size="medium"
+                                            size="small"
                                             onClick={this.loadMore}
+                                            variant="contained"
+                                            color="primary"  
+                                            style={{width: '100%', margin: '10px'}}
+                                            disabled={working || items.length >= itemsAvailable}
                                         >
                                             Load more
                                         </Button>