crap
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import {ServiceSchema} from "../../../../client";
|
||||
import {FC, RefObject} from "react";
|
||||
import {useServicesTableColumns} from "./columns.tsx";
|
||||
import {BaseTable, BaseTableRef} from "../../../../components/BaseTable/BaseTable.tsx";
|
||||
import {MRT_TableOptions} from "mantine-react-table";
|
||||
|
||||
type Props = {
|
||||
services: ServiceSchema[];
|
||||
tableRef?: RefObject<BaseTableRef<ServiceSchema>>
|
||||
}
|
||||
const ServicesTable: FC<Props> = ({services, tableRef}) => {
|
||||
const columns = useServicesTableColumns();
|
||||
return (
|
||||
<BaseTable
|
||||
ref={tableRef}
|
||||
data={services}
|
||||
columns={columns}
|
||||
restProps={{
|
||||
enableGrouping: true,
|
||||
initialState: {grouping: ["category"]},
|
||||
enableColumnActions: false,
|
||||
mantineCreateRowModalProps: {
|
||||
transitionProps: {transition: 'rotate-left', duration: 300}
|
||||
},
|
||||
} as MRT_TableOptions<ServiceSchema>}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default ServicesTable;
|
||||
Reference in New Issue
Block a user