const columnHelper = createColumnHelper<Person>();
const defaultColumns: ColumnDef<Person>[] = [
columnHelper.group({
id: 'info',
header: () => <span>Info</span>,
columns: [
{
accessorKey: 'firstName',
id: 'firstName',
header: 'First Name',
cell: (info) => info.getValue(),
footer: (props) => props.column.id,
size: 180,
},
{
accessorFn: (row) => row.lastName,
id: 'lastName',
cell: (info) => info.getValue(),
header: () => <span>Last Name</span>,
footer: (props) => props.column.id,
size: 180,
},
],
}),
{
accessorKey: 'age',
id: 'age',
header: 'Age',
footer: (props) => props.column.id,
size: 180,
},
{
accessorKey: 'visits',
id: 'visits',
header: 'Visits',
footer: (props) => props.column.id,
size: 180,
},
{
accessorKey: 'status',
id: 'status',
header: 'Status',
footer: (props) => props.column.id,
size: 180,
},
{
accessorKey: 'progress',
id: 'progress',
header: 'Profile Progress',
footer: (props) => props.column.id,
size: 180,
},
];
then try pin "info" group info to the left (or right).
TanStack Table version
8.13.2
Framework/Library version
18.2.0
Describe the bug and the steps to reproduce it
open https://tanstack.com/table/v8/docs/framework/react/examples/column-pinning-sticky example and group firstname and lastname
then try pin "info" group info to the left (or right).
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/tanstack-table-n7umup?file=src%2Fmain.tsx
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct