mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Reset pagination when output size changes (#9652)
This commit is contained in:
@@ -1094,6 +1094,9 @@ export default defineComponent({
|
||||
jsonData(data: IDataObject[], prevData: IDataObject[]) {
|
||||
if (isEqual(data, prevData)) return;
|
||||
this.refreshDataSize();
|
||||
if (this.dataCount) {
|
||||
this.resetCurrentPageIfTooFar();
|
||||
}
|
||||
this.showPinDataDiscoveryTooltip(data);
|
||||
},
|
||||
binaryData(newData: IBinaryKeyData[], prevData: IBinaryKeyData[]) {
|
||||
@@ -1411,12 +1414,16 @@ export default defineComponent({
|
||||
items_total: this.dataCount,
|
||||
});
|
||||
},
|
||||
onPageSizeChange(pageSize: number) {
|
||||
this.pageSize = pageSize;
|
||||
resetCurrentPageIfTooFar() {
|
||||
const maxPage = Math.ceil(this.dataCount / this.pageSize);
|
||||
if (maxPage < this.currentPage) {
|
||||
this.currentPage = maxPage;
|
||||
}
|
||||
},
|
||||
onPageSizeChange(pageSize: number) {
|
||||
this.pageSize = pageSize;
|
||||
|
||||
this.resetCurrentPageIfTooFar();
|
||||
|
||||
this.$telemetry.track('User changed ndv page size', {
|
||||
node_type: this.activeNode?.type,
|
||||
|
||||
Reference in New Issue
Block a user