import { DataTable } from "mantine-datatable"; import { IconChevronRight, IconSpace } from "@tabler/icons-react"; import clsx from "clsx"; import classes from "../../../OrganizationalStructureTab/components/DepartmentsTree/DepartmentsTree.module.css"; import { useState } from "react"; import { PlaceSchema } from "../../../../../../client"; import PlaceActions from "./PlaceActions.tsx"; type Props = { place: PlaceSchema; } const Place = ({ place }: Props) => { const [placeTypeIds, setPlaceTypeIds] = useState([]); return ( ( <> {placeType.name} {number} ), }, { accessor: "actions", title: "", width: "0%", render: (place) => ( ), }, ]} records={place.children?.sort((a, b) => a.id - b.id)} rowExpansion={{ allowMultiple: true, expanded: { recordIds: placeTypeIds, onRecordIdsChange: setPlaceTypeIds }, content: ({ record }) => ( ), }} /> ); }; export default Place;