Primeng: Ability to Filter Complex Objects in Turbo Table

Created on 10 Apr 2018  路  3Comments  路  Source: primefaces/primeng

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Right now turbo table has no issue filtering flat data that is passed to it.

Expected behavior
It would be great if turbo table could filter complex objects.

  • Angular version: 5

  • PrimeNG version: 5.2.4

I've searched for this and wasn't able to find anything so if this feature already exists or is in the works let me know.

Lets say I have a table and I'm pulling in a list of clients. Maybe one of the parameters is an address object which contains parameters like city, state, zip etc. I can easily make any of those values appear in the table (E.g client.address.city) but because they are part of the address object I am unable to filter or sort by those values.

This is currently what Material 2 offers for flattening out the data, giving users the ability to filter/sort.

      this.dataSource.filterPredicate = (client: Client, filter) => {
        let dataStr = client.step + client.name + client.interest.industry + client.interest.package + client.address.city + client.address.state + client.origin;
        return dataStr.toLowerCase().indexOf(filter) != -1; 
      }
new feature

Most helpful comment

is this new feature in the PrimeNG 6 release?

All 3 comments

Same issue =)

is this new feature in the PrimeNG 6 release?

Are there any newses regarding that?

Was this page helpful?
0 / 5 - 0 ratings