Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/erp/genseki/collections/posts.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ export const columns = [
columnHelper.accessor('author.name', {
header: 'Author Name',
cell: (info) => info.getValue(),
meta: {
thClassName: 'bg-orange-700',
},
}),
columnHelper.accessor('author.email', {
header: 'Author Email',
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './auth'
export * from './core'
export * from './react'
export type * from './types/tanstack.d.ts'
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export function TanstackTable<T>({
className={clsx(
'focus-visible:ring-focus ring-inset',
header.colSpan > 1 && 'border-bluegray-300 border-b',
classNames?.tableHead
classNames?.tableHead,
header.column.columnDef.meta?.thClassName
)}
onClick={
canSort && children ? header.column.getToggleSortingHandler() : undefined
Expand Down
8 changes: 8 additions & 0 deletions packages/react/src/types/tanstack.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import '@tanstack/react-table'

declare module '@tanstack/react-table' {
interface ColumnMeta<TData, TValue> {
thClassName?: string
}
}
Loading