TanStackT
TanStack3y ago
3 replies
rubber-blue

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?

{
    header: 'Ingredients',
    footer: (props) => props.column.id,
    columns: [
      {
        accessorKey: 'ingredientOne',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientTwo',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientThree',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientFour',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientFive',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientSix',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientSeven',
        header: () => '',
        footer: (info) => info.column.id,
      },
      {
        accessorKey: 'ingredientEight',
        header: () => '',
        footer: (info) => info.column.id,
      },
    ],
  },
Was this page helpful?