React-table: Initial Filtering

Created on 21 Jun 2017  路  4Comments  路  Source: tannerlinsley/react-table

Problem Description

Hi. I would like to filter the table on the first render using, for example, an ID.
is that possible? I am passing an array to the 'defaultFiltered' props, but nothing happens.

Thank you.

Most helpful comment

Please see here: https://codepen.io/tannerlinsley/pen/OgQmKa?editors=0010 for how to use defaultFiltered Or join us on slack for more discussion!


All 4 comments

That would likely be done outside of your render function, f.e. a callback function in componentWillMount

Please see here: https://codepen.io/tannerlinsley/pen/OgQmKa?editors=0010 for how to use defaultFiltered Or join us on slack for more discussion!


@tannerlinsley Here you have mentioned a single value for the filter. Can we use an array of key and values for filter and if how can it be done? thanks

Please see here: https://codepen.io/tannerlinsley/pen/OgQmKa?editors=0010 for how to use defaultFiltered Or join us on slack for more discussion!

Thanks a lot. It is working for me :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwjft picture dwjft  路  3Comments

tremby picture tremby  路  3Comments

mlajszczak picture mlajszczak  路  3Comments

Codar97 picture Codar97  路  3Comments

ocalde picture ocalde  路  3Comments