Skip to content
Discussion options

You must be logged in to vote

Alright, after digging a bit, I realized I can modify the cell property:

{
    accessorKey: "email",
    header: "Email",
},
{
    accessorKey: "email",
    header: "Email",
+    cell: ({ getValue }) => (
+      <span>
+        {Array.isArray(getValue()) ? (
+          <ul>
+            {(getValue() as string[]).map((item: string, index: number) => (
+              <li key={index}>• {item}</li>
+            ))}
+          </ul>
+        ) : (
+          (getValue() as React.ReactNode)
+        )}
+      </span>
+    ),
  },

The changes are in the link from top.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kalaschnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant