Skip to content

filterBy with nested object #53

Answered by vincjo
azern32 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes it is possible, by using a callback.

Instead of a key name, filterBy can take a function as argument:

<ThFilter {handler} filterBy={(row) => row.leadDetail.brand}/>

With DataHandler instance:

handler.filter(value, (row) => row.leadDetail.brand)

Note that filter by an object works too: filterBy="leadDetail" will filter by brand + phone + ...

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by azern32
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants