Skip to content

Commit cdc92e8

Browse files
committed
fix
1 parent ddbb63b commit cdc92e8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,6 +2528,8 @@ class Browser extends DashboardView {
25282528
this.setState({ limit });
25292529
this.updateOrdering(this.state.ordering);
25302530
}}
2531+
hasSelectedRows={Object.keys(this.state.selection).length > 0}
2532+
selectedRowsMessage={SELECTED_ROWS_MESSAGE}
25312533
/>
25322534
</>
25332535
);

src/dashboard/Data/Browser/BrowserFooter.react.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class BrowserFooter extends React.Component {
1919
}
2020

2121
handleLimitChange = event => {
22+
// Check if there are selected rows
23+
if (this.props.hasSelectedRows && !window.confirm(this.props.selectedRowsMessage)) {
24+
return;
25+
}
2226
const newLimit = parseInt(event.target.value, 10);
2327
this.props.setLimit(newLimit);
2428
this.props.setSkip(0);
@@ -27,6 +31,10 @@ class BrowserFooter extends React.Component {
2731

2832
handlePageChange = newSkip => {
2933
if (newSkip >= 0 && newSkip < this.props.count) {
34+
// Check if there are selected rows
35+
if (this.props.hasSelectedRows && !window.confirm(this.props.selectedRowsMessage)) {
36+
return;
37+
}
3038
this.props.setSkip(newSkip);
3139
this.setState({ pageInput: (Math.floor(newSkip / this.props.limit) + 1).toString() });
3240
}

0 commit comments

Comments
 (0)