Primeng: Custom filterFunction for datatable filters similar to sortFunction

Created on 27 Jul 2017  路  2Comments  路  Source: primefaces/primeng

[ ] 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
Datatable filter cannot be used with objects/arrays.
If i pass in a object (or array of objects), for example {name: 'test', id: 1} I would like to be able to have the column filtered by name. Because in a custom column template i use the name field as a display value but on rowclick i need to get the id to further doSomething() with the id. Therefor the object as data.

In some cases i may have an array of items or array of objects:
[1,2,3,4,5] or [{role: 'test', id: 1},{role: 'test2', id: 2}]

Or when using a range filter component (like from year to year).

Expected behavior
Can specify custom filter method similar to sortFunction.

Most helpful comment

Can we reopen this? still not available in the new TurboTable.
I would also like this.

All 2 comments

p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.

Can we reopen this? still not available in the new TurboTable.
I would also like this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

watalberto picture watalberto  路  3Comments

mitosandov picture mitosandov  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

just-paja picture just-paja  路  3Comments