From 938f8233adba79fbf9c3d66207cef7b1679df190 Mon Sep 17 00:00:00 2001 From: PC0 Date: Tue, 30 Jul 2024 12:57:14 +0330 Subject: [PATCH] closes #16070 Table> double call to (onLazyLoad) event #16070 Table> double call to (onLazyLoad) event --- src/app/components/table/table.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 26d4a331141..2971b24ee56 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -1586,7 +1586,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable field: field, order: order }); - } else { + } else if (!this.lazy) { this.value.sort((data1, data2) => { let value1 = ObjectUtils.resolveFieldData(data1, field); let value2 = ObjectUtils.resolveFieldData(data2, field); @@ -1604,7 +1604,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable this._value = [...this.value]; } - if (this.hasFilter()) { + if (!this.lazy && this.hasFilter()) { this._filter(); } } @@ -1634,7 +1634,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable mode: this.sortMode, multiSortMeta: this.multiSortMeta }); - } else { + } else if (!this.lazy) { this.value.sort((data1, data2) => { return this.multisortField(data1, data2, this.multiSortMeta, 0); }); @@ -1642,7 +1642,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable this._value = [...this.value]; } - if (this.hasFilter()) { + if (!this.lazy && this.hasFilter()) { this._filter(); } }