Added scrollarea on table
This commit is contained in:
parent
852459fdc2
commit
d06010abe6
|
|
@ -1,15 +1,16 @@
|
||||||
"use client";
|
"use client";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { Table, Center } from "@mantine/core"
|
import { Table, Center, ScrollArea } from "@mantine/core";
|
||||||
import { Table as ReactTable, flexRender } from "@tanstack/react-table";
|
import { Table as ReactTable, flexRender } from "@tanstack/react-table";
|
||||||
|
|
||||||
interface Props<TData> {
|
interface Props<TData> {
|
||||||
table: ReactTable<TData>
|
table: ReactTable<TData>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DashboardTable<T>({table}: Props<T>) {
|
export default function DashboardTable<T>({ table }: Props<T>) {
|
||||||
return (
|
return (
|
||||||
|
<ScrollArea.Autosize>
|
||||||
<Table verticalSpacing="xs" horizontalSpacing="xs">
|
<Table verticalSpacing="xs" horizontalSpacing="xs">
|
||||||
{/* Thead */}
|
{/* Thead */}
|
||||||
<Table.Thead>
|
<Table.Thead>
|
||||||
|
|
@ -64,5 +65,6 @@ export default function DashboardTable<T>({table}: Props<T>) {
|
||||||
)}
|
)}
|
||||||
</Table.Tbody>
|
</Table.Tbody>
|
||||||
</Table>
|
</Table>
|
||||||
|
</ScrollArea.Autosize>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user