TurboTable - Filter doesn't work well with lazy mode

UI Components for Angular
Post Reply
yeweinan
Posts: 14
Joined: 18 Jan 2018, 06:58

18 Jan 2018, 07:09

Hi everyone,

Before all, thanks a lot for bringing us the turbo table.

Env: primeng 5.2.0 rc1, Angular 5.0.2

Comparing the codes between datatable.js & table.js

Table.prototype.filter = function (value, field, matchMode) {
if (!this.isFilterBlank(value))
this.filters[field] = { value: value, matchMode: matchMode };
else if (this.filters[field])
delete this.filters[field];
if (this.hasFilter()) {
this._filter();
}
else {
this.filteredValue = null;
if (this.paginator) {
this.totalRecords = this.value ? this.value.length : 0;
}
}
};

DataTable.prototype.filter = function (value, field, matchMode) {
if (!this.isFilterBlank(value))
this.filters[field] = { value: value, matchMode: matchMode };
else if (this.filters[field])
delete this.filters[field];
this._filter();
};

If I removed the last character of the filter, the function this._filter() will not be called in turbo table. That means my lazy load function will not be called.

It works fine in DataTable.

Any luck fixing this?

Thank you!


cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Jan 2018, 16:39

Fixed now for RC2

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 11 guests