From ba3d5e2c7dd265731b161fa021eddd2f2b06b1b8 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 23 Jan 2025 12:49:07 +0300 Subject: [PATCH] docs(table): describe `meta` field on columns (#3160) --- docs/content/3.components/table.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/3.components/table.md b/docs/content/3.components/table.md index 98f972b5..82eb61eb 100644 --- a/docs/content/3.components/table.md +++ b/docs/content/3.components/table.md @@ -77,6 +77,10 @@ Use the `columns` prop as an array of [ColumnDef](https://tanstack.com/table/lat - `accessorKey`: [The key of the row object to use when extracting the value for the column.]{class="text-[var(--ui-text-muted)]"} - `header`: [The header to display for the column. If a string is passed, it can be used as a default for the column ID. If a function is passed, it will be passed a props object for the header and should return the rendered header value (the exact type depends on the adapter being used).]{class="text-[var(--ui-text-muted)]"} - `cell`: [The cell to display each row for the column. If a function is passed, it will be passed a props object for the cell and should return the rendered cell value (the exact type depends on the adapter being used).]{class="text-[var(--ui-text-muted)]"} +- `meta`: [Extra properties for the column.]{class="text-[var(--ui-text-muted)]"} + - `class`: + - `td`: [The classes to apply to the `td` element.]{class="text-[var(--ui-text-muted)]"} + - `th`: [The classes to apply to the `th` element.]{class="text-[var(--ui-text-muted)]"} In order to render components or other HTML elements, you will need to use the Vue [`h` function](https://vuejs.org/api/render-function.html#h) inside the `header` and `cell` props. This is different from other components that use slots but allows for more flexibility.