set default filter function for all columns #4274
Answered
by
tannerlinsley
victorkvarghese
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Provide a defaultColumn to the table
Tanner Linsley
…On Aug 5, 2022, 4:41 AM -0600, Victor K Varghese ***@***.***>, wrote:
Hi,
How does react-table figure out which filter function to use?
I have a table with multi select filter for all columns, filter is working with single values, but with array its failing
if i provide filter as filterFn:'arrIncludesSome' it works.
{
accessorKey: 'id',
header: 'id',
cell: info => <CEllText text={info.getValue() as string}/>,
size: 50,
filterFn:'arrIncludesSome'
},
I think by default table uses includesString
is there a way to override this? without defining filter function for each column def?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
victorkvarghese
-
@victorkvarghese can you provide a working example of this? I'm curious how the filter component works. At the moment It's throwing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How does react-table figure out which filter function to use?
I have a table with multi select filter for all columns, filter is working with single values, but with array its failing
if i provide filter as
filterFn:'arrIncludesSome'
it works.I think by default table uses
includesString
but i need to usedarrIncludesSome
as default filteris there a way to override this? without defining filter function for each column def?
UPDATE:
I checked the filter fns code,
seems like based on type we are choosing the filter fns. But for multi select filters
includesString
will failBeta Was this translation helpful? Give feedback.
All reactions