feat: 조직도 트리 dnd 작업

This commit is contained in:
2025-04-21 20:19:50 +09:00
parent e99fc06181
commit 5d942f735e
6 changed files with 63 additions and 8 deletions
@@ -5,7 +5,7 @@ import { cn } from "@common/components/lib";
import { EditableNode } from "./editable-node";
interface TreeData extends Record<string, unknown> {
children: unknown[];
children?: unknown[];
}
type CustomNodeProps<T extends TreeData> = {
@@ -72,7 +72,7 @@ function CustomNode<T extends TreeData>({
) : (
<>
<div className="flex items-center" onClick={handleSelect}>
{data && data.children.length > 0 && (
{data && data.children && data.children.length > 0 && (
<i
className={cn(
"diveicon di-arrow-forward mr-2 text-base text-label",
+1 -1
View File
@@ -15,7 +15,7 @@ import { cn } from "@common/components/lib";
import { CustomNode } from "./custom-node";
interface TreeData extends Record<string, unknown> {
children: unknown[];
children?: unknown[];
}
type EditableNodeProps = { depth: number };