fix: positions totals row aligned with DataTable columns, restore $ prefix
This commit is contained in:
@@ -17,6 +17,7 @@ interface Props<T> {
|
||||
onRowClick?: (row: T) => void;
|
||||
filterFn?: (row: T, query: string) => boolean;
|
||||
emptyMessage?: string;
|
||||
footerRow?: ReactNode;
|
||||
}
|
||||
|
||||
export function DataTable<T extends object>({
|
||||
@@ -27,6 +28,7 @@ export function DataTable<T extends object>({
|
||||
onRowClick,
|
||||
filterFn,
|
||||
emptyMessage = 'No data',
|
||||
footerRow,
|
||||
}: Props<T>) {
|
||||
const [sortKey, setSortKey] = useState<string | null>(null);
|
||||
const [sortDir, setSortDir] = useState<'asc' | 'desc'>('asc');
|
||||
@@ -122,6 +124,11 @@ export function DataTable<T extends object>({
|
||||
))
|
||||
)}
|
||||
</tbody>
|
||||
{footerRow && (
|
||||
<tfoot className="border-t border-surface-700 bg-surface-900">
|
||||
{footerRow}
|
||||
</tfoot>
|
||||
)}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user