Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #16070 Table> double call to (onLazyLoad) event #16130

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.customSort) && 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.customSort) && this.hasFilter()) {
this._filter();
}
}
Expand Down
Loading