table.options.meta Typescript definition
Is it possible to define meta Typescript definition only for one table and not on global level how it is shown in documentation?
https://tanstack.com/table/v8/docs/api/core/table#meta
Table | TanStack Table Docs
useReactTable / createSolidTable / useVueTable / createSvelteTable
`tsx
6 Replies
wise-whiteOP•2y ago
By defining like this in documentation is is only for that table or for all tables that we import from @tanstack/table-core ?
ambitious-aqua•2y ago
As far as I know, the definitions being made are only done globally.
I generally go about making these properties optional on the interface.
unwilling-turquoise•2y ago
In my codebase, I was declaring custom properties on the table meta like so:
After updating to latest versions, this doesn't seem to take any effect, and now
meta?.customOption
in my code gives me typescript errors Property customOption does not exist on TableMeta<TData>
Does anyone know how I can get to the bottom of this?ambitious-aqua•2y ago
For Tanstack Table v8, you need to make your declarations on the
@tanstack/table-core
package. You don't need to install it, its bundled with @tanstack/react-table
.ambitious-aqua•2y ago
GitHub
nv-rental-clone/src/tanstack-table.d.ts at master · SeanCassiere/nv...
Navotar with Tailwind and the Tanstack. Contribute to SeanCassiere/nv-rental-clone development by creating an account on GitHub.
unwilling-turquoise•2y ago
@Sean Cassiere thanks for the reply, just updated to use
@tanstack/table-core
instead in the declaration, but still seeing the same error