diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-30 17:15:44 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-30 17:15:44 +0900 |
| commit | d674b066a9a3195d764f693885fb9f25d66263ed (patch) | |
| tree | d6f26b80c0b2010f47bcec9b12733d633a8064c4 /components/client-table/client-table-view-options.tsx | |
| parent | 12af09245b38da8cc3fdb851ebb03bc0de45c8be (diff) | |
| parent | 81aa92fecc298d66eb420468316bcf7a7213171c (diff) | |
Merge branch 'dynamic-data-table' into bugfix-schema
Diffstat (limited to 'components/client-table/client-table-view-options.tsx')
| -rw-r--r-- | components/client-table/client-table-view-options.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/client-table/client-table-view-options.tsx b/components/client-table/client-table-view-options.tsx index b65049b4..3b659fcd 100644 --- a/components/client-table/client-table-view-options.tsx +++ b/components/client-table/client-table-view-options.tsx @@ -42,14 +42,21 @@ export function ClientTableViewOptions<TData>({ typeof column.accessorFn !== "undefined" && column.getCanHide() ) .map((column) => { + const header = column.columnDef.header + let label = column.id + if (typeof header === "string") { + label = header + } + return ( <DropdownMenuCheckboxItem key={column.id} className="capitalize" checked={column.getIsVisible()} onCheckedChange={(value) => column.toggleVisibility(!!value)} + onSelect={(e) => e.preventDefault()} // default action close the select menu. > - {column.id} + {label} </DropdownMenuCheckboxItem> ) })} |
