multiple values in same cell
Hi. I just started using tan stack table. I have something setup. It's displaying data from my database in a table. This part of the table lists 8 fetched items from the database. Rather than each item being in its own cell I'd ike for all eight items to be in the same cell...... Is that possible?
1 Reply
jolly-crimsonOP•2y ago
I think something like this is working:
accessorFn: (row) =>
${row.ingredientOne} ${row.ingredientTwo},
experimenting meow
this works but puts null in the table if the value is null....
accessorFn: (row) =>
${row.ingredientOne} ${row.ingredientTwo} ${row.ingredientThree} ${row.ingredientFour} ${row.ingredientFive} ${row.ingredientSix} ${row.ingredientSeven} ${row.ingredientEight}
,
final answer:
{
id: 'ingredients',
header: () => '',
footer: (info) => info.column.id,
accessorFn: (row) =>
${row.ingredientOne ?? ''} ${row.ingredientTwo ?? ''} ${
row.ingredientThree ?? ''
} ${row.ingredientFour ?? ''} ${row.ingredientFive ?? ''} ${
row.ingredientSix ?? ''
} ${row.ingredientSeven ?? ''} ${row.ingredientEight ?? ''}
,
},