Skip to content

Commit 5bb2aeb

Browse files
committed
perf(QTable): More perf work on pagination handling
1 parent 2942e03 commit 5bb2aeb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/src/components/table/QTable.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ export default Vue.extend({
164164
const rowsNumber = rows.length
165165

166166
if (rowsPerPage !== 0) {
167-
rows = rows.slice(this.firstRowIndex, this.lastRowIndex)
167+
if (this.firstRowIndex === 0 && this.data !== rows) {
168+
rows.length = this.lastRowIndex
169+
}
170+
else {
171+
rows = rows.slice(this.firstRowIndex, this.lastRowIndex)
172+
}
168173
}
169174

170175
return { rowsNumber, rows }

0 commit comments

Comments
 (0)