T
TanStack3y ago
useful-bronze

Multiple Values in 1 cell

Hi guys, I need to map array of objects and render multiple values in one cell. The only way is to access props.row.original with needed array and iterate it? Like props.row.data.map(el => <span>{el.name}</span>) or there is something else?
2 Replies
flat-fuchsia
flat-fuchsia3y ago
You can use an accessorFn but yes, row original also works
itchy-amethyst
itchy-amethyst3y ago
I think there are different strategies: - accessorFn - props.row.original - pass an object instead of a primitive to value - hide a column with the additional data and access it with row.values I prefer to pass an object to value, but how do u cope with the fact that it breaks filters and sorting as u need to then define a custom filerFn to target the right key?

Did you find this page helpful?