EditableTable: use ReUI ui/table instead of a raw table

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
DenozordecandClaude Sonnet 5.5 committed 2026-10-30 11:13:42 +07:00
1 parent 59f882e58c
commit 36bfd6136b
1 file changed
+10 -5
+10 -5
View File
@@ -1,4 +1,5 @@
import type { ReactNode } from 'react' import type { ReactNode } from 'react'
import { Table, TableBody, TableHeader } from '@/components/ui/table'
import styles from './EditableTable.module.css' import styles from './EditableTable.module.css'
/* /*
@@ -24,12 +25,16 @@ export function EditableTable({
children: ReactNode children: ReactNode
className?: string className?: string
}) { }) {
/* The table is ReUI's `ui/table` (its container scrolls sideways on a narrow
screen). Not a `data-grid`: the rows are inputs and selects edited in place,
which the grid's sorting, paging and selection have nothing to do with. The
cells stay native `th`/`td` that the callers lay out. */
return ( return (
<table className={[styles.table, className].filter(Boolean).join(' ')}> <Table className={[styles.table, className].filter(Boolean).join(' ')}>
<thead> <TableHeader>
<tr>{header}</tr> <tr>{header}</tr>
</thead> </TableHeader>
<tbody>{children}</tbody> <TableBody>{children}</TableBody>
</table> </Table>
) )
} }