Public alpha.It works. Parts may still change.
Your users type. Your TanStack Table filters, sorts and groups.
Add our plugin to a TanStack Table v9 table (9.3.1 or later). Your users say what they want to see, and the table shows it. This is the code it takes.
import { assistantColumn, assistantGroupedRowModel, useTableAssistant,} from '@gridsay/tanstack-table/react'; const table = useTable({ features, columns, data, defaultColumn: assistantColumn, // the line that lets the assistant filter and sort});const { ask, undo, canUndo, pending, error } = useTableAssistant(table, { url: '/api/tanstack-table' });What your users can type.
Follow-up questions build on the last answer, and undo puts back what it changed.
- Filter.
orders over 500 from Germany. With “and” and “or”. A column with its own filter is left to you.
- Sort.
newest first
- Group.
group by country
- Select the top rows.
select the top five by total
Add it in three steps.
Create a key.
Start the trial and create a secret key in the dashboard.
Forward questions from your server.
A route on your server sends each question to Gridsay with your key.
Add the plugin to your table.
Set
assistantColumnas the table’sdefaultColumn, pass the table touseTableAssistantand send what your user types toask.
npm install @gridsay/tanstack-table @tanstack/react-table@^9.3.1Check that it fits.
- It needs TanStack Table v9.
It does not work with v8 or with tables built on it, such as Material React Table and Mantine React Table.
- It filters, sorts, groups and selects.
It does not make pivots, charts, totals or averages. A question that needs one gets a sentence back.
- It is a public alpha.
It works, but parts are still moving, and the plugin and its options may change without notice. What the statuses mean.
Hear about changes to the plugin.
Leave your email and we will write about changes to the plugin.