18029: Disable pagination next if list is empty
[arvados-workbench2.git] / src / components / data-explorer / data-explorer.tsx
index a38d0ed65ae3c03eb9affdd76a67cf423b2fbd60..d272e870bf0caaa46c7918624fe091265fb5c762 100644 (file)
@@ -134,6 +134,8 @@ export const DataExplorer = withStyles(styles)(
                             page={this.props.page}
                             onChangePage={this.changePage}
                             onChangeRowsPerPage={this.changeRowsPerPage}
+                            // Disable next button on empty lists since that's not default behavior
+                            nextIconButtonProps={(itemsAvailable > 0) ? {} : {disabled: true}}
                             component="div" /> : <Button
                                 variant="text"
                                 size="medium"