Skip to content

Commit 320c395

Browse files
committed
perf(QTable): Slightly improve data collection logic
1 parent 51f4314 commit 320c395

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ui/src/components/table/QTable.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ export default Vue.extend({
154154
}
155155

156156
if (this.columnToSort !== void 0) {
157-
rows = this.sortMethod(rows.slice(), sortBy, descending)
157+
rows = this.sortMethod(
158+
this.data === rows ? rows.slice() : rows,
159+
sortBy,
160+
descending
161+
)
158162
}
159163

160164
const rowsNumber = rows.length

0 commit comments

Comments
 (0)