Repository navigation
|
is it possible to filter a column by a key in an object? what alternative should I do to achieve the filtering btw, the data structure for the table was like this |
Answered by
vincjo
Aug 10, 2023
Replies: 2 comments
|
Yes it is possible, by using a callback. Instead of a key name, <ThFilter {handler} filterBy={(row) => row.leadDetail.brand}/>With handler.filter(value, (row) => row.leadDetail.brand)Note that filter by an object works too: |
0 replies
Answer selected by
azern32
|
Ah.... so you can just use a function in that |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Yes it is possible, by using a callback.
Instead of a key name,
filterBycan take a function as argument:With
DataHandlerinstance:Note that filter by an object works too:
filterBy="leadDetail"will filter bybrand+phone+ ...