Skip to content

Commit

Permalink
closes primefaces#16070 Table> double call to (onLazyLoad) event
Browse files Browse the repository at this point in the history
primefaces#16070 Table> double call to (onLazyLoad) event
  • Loading branch information
codizen-dev committed Jul 30, 2024
1 parent d90f82f commit 938f823
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
}
}
Expand Down Expand Up @@ -1634,15 +1634,15 @@ 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, <SortMeta[]>this.multiSortMeta, 0);
});

this._value = [...this.value];
}

if (this.hasFilter()) {
if (!this.lazy && this.hasFilter()) {
this._filter();
}
}
Expand Down

0 comments on commit 938f823

Please sign in to comment.