make table clickable
This commit is contained in:
parent
b1de1477a6
commit
9c9b010dc1
|
@ -72,7 +72,6 @@ export function DataTable<TData, TValue>({
|
|||
},
|
||||
})
|
||||
const pathname = usePathname()
|
||||
const router = useRouter()
|
||||
const [filterBy, setFilterBy] = useState(table.getAllColumns()[0])
|
||||
return (<>
|
||||
<div className="flex justify-between py-4">
|
||||
|
@ -169,7 +168,10 @@ export function DataTable<TData, TValue>({
|
|||
data-state={row.getIsSelected() && "selected"}
|
||||
>
|
||||
{row.getVisibleCells().map((cell) => (
|
||||
<TableCell key={cell.id}>
|
||||
<TableCell key={cell.id}
|
||||
|
||||
onClick={(e) => { console.log(`row: ${JSON.stringify(row.original)} cell: ${cell.id} ${JSON.stringify(e.timeStamp)}`) }}
|
||||
>
|
||||
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
||||
</TableCell>
|
||||
))}
|
||||
|
|
Loading…
Reference in New Issue