handling nested values
I have an array of objects, they have nested objects insides them, how to handle displaying them in the table, knowing that they for example differ in the number of activeIngredients they have.
3 Replies
absent-sapphire•14mo ago
This is mentioned in the docs, where you can handling it using dot notation.
https://tanstack.com/table/latest/docs/guide/data#deep-keyed-data
Data Guide | TanStack Table Docs
Data Guide
Tables start with your data. Your column definitions and rows will depend on the shape of your data. TanStack Table has some TypeScript features that will help you create the rest of your table code with a great type-safe experience. If you set up your data and types correctly, TanStack Table will be able to infer the shape of your ...
absent-sapphire•14mo ago
Data Guide | TanStack Table Docs
Data Guide
Tables start with your data. Your column definitions and rows will depend on the shape of your data. TanStack Table has some TypeScript features that will help you create the rest of your table code with a great type-safe experience. If you set up your data and types correctly, TanStack Table will be able to infer the shape of your ...
defeated-apricotOP•14mo ago
but it didn't mention how to handle dynamic number of subrows.
this almost does what I want, the values are rendered next to each other.
but I want each one to be in a sperate field.