Skip to content

Commit

Permalink
Fixed #1792 - Datatable doesn't change page when the last element on …
Browse files Browse the repository at this point in the history
…a page is removed.
  • Loading branch information
mertsincan committed Feb 1, 2021
1 parent 23efd20 commit 43e1f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export class TableBody extends Component {

if(this.props.value && this.props.value.length) {
rows = [];
let startIndex = this.props.lazy ? 0 : first;
let startIndex = this.props.lazy ? 0 : (this.props.value.length > first ? first : 0);
let endIndex = this.props.virtualScroll ? (startIndex + rpp * 2) : (startIndex + rpp||this.props.value.length);

for(let i = startIndex; i < endIndex; i++) {
Expand Down

0 comments on commit 43e1f95

Please sign in to comment.