ui
ui copied to clipboard
Ability to hide columns?
Are we able to define hidden columns?
For example: I want the ID column to be hidden, but be able to get the values whit: row.getValue("id")
{ accessorKey: "id", header: "#" },
You should be able to access other data via the original object available on the row
Ie. something like this where a full name column is derived from a combination of two pieces of data
export type User = {
first_name: string
last_name: string
}
export const columns: ColumnDef<User>[] = [
{
accessorKey: 'last_name',
header: 'Name',
cell: ({ row }) => {
return (
<span>
{row.original.first_name} {row.getValue('last_name')}
</span>
)
},
},
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.