TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.93k stars 3.07k forks source link

Make an API for react-table (request) #477

Closed nzhtrtlc closed 6 years ago

nzhtrtlc commented 7 years ago

Hi @tannerlinsley and other contributers;

Can you make an API for the reac-table ?

I tried to filter my table in custom text input. But changing table data array is not fast as native filter function. If you can provide an api it'll be very good for me and other users. At least add api for filter. Example;

import ReacTable from 'react-table';

const reactTable = ReactTable.getInstance();

onFilter(val){ reactTable.filter(val); // this line can run the filterMethod that we define in component otherwise run as default. }

I need something like that.

Thanks.

tannerlinsley commented 6 years ago

You can do this already. Use a ref to acquire the instance. Then use the instance programmatically.