build ok,
This commit is contained in:
@@ -8,6 +8,7 @@ import TableBody from '@mui/material/TableBody';
|
||||
import TableCell from '@mui/material/TableCell';
|
||||
import TableHead from '@mui/material/TableHead';
|
||||
import TableRow from '@mui/material/TableRow';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export interface ColumnDef<TRowModel> {
|
||||
align?: 'left' | 'right' | 'center';
|
||||
@@ -52,6 +53,7 @@ export function DataTable<TRowModel extends object & { id?: RowId | null }>({
|
||||
}: DataTableProps<TRowModel>): React.JSX.Element {
|
||||
const selectedSome = (selected?.size ?? 0) > 0 && (selected?.size ?? 0) < rows.length;
|
||||
const selectedAll = rows.length > 0 && selected?.size === rows.length;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Table {...props}>
|
||||
@@ -83,7 +85,7 @@ export function DataTable<TRowModel extends object & { id?: RowId | null }>({
|
||||
...(column.align && { textAlign: column.align }),
|
||||
}}
|
||||
>
|
||||
{column.hideName ? null : column.name}
|
||||
{column.hideName ? null : t(column.name)}
|
||||
</TableCell>
|
||||
)
|
||||
)}
|
||||
|
Reference in New Issue
Block a user