12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { FC } from "react";
- import { DageTreeActionsProps } from "./types";
- import { DageTreeTitle } from "./Title";
- import { TreeActions } from "./style";
- export const DageTreeActions: FC<DageTreeActionsProps> = ({
- maxLevel,
- onAdd,
- onEdit,
- onDelete,
- ...props
- }) => {
- return (
- // @ts-ignore
- <TreeActions
- blockNode
- defaultExpandAll
- virtual={false}
- {...props}
- fieldNames={{
- title: "name",
- key: "id",
- }}
- titleRender={(data) => (
- <DageTreeTitle
- // @ts-ignore
- data={data}
- treeData={props.treeData}
- maxLevel={maxLevel}
- onAdd={onAdd}
- onEdit={onEdit}
- onDelete={onDelete}
- />
- )}
- />
- );
- };
- export * from "./types";
- export * from "./utils";
|