|
@@ -15,7 +15,7 @@ export interface TreeNodeData {
|
|
|
key: string;
|
|
key: string;
|
|
|
id: string;
|
|
id: string;
|
|
|
title: string | React.ReactNode;
|
|
title: string | React.ReactNode;
|
|
|
- title_text?: string | React.ReactNode;
|
|
|
|
|
|
|
+ title_text?: string;
|
|
|
icon?: React.ReactNode;
|
|
icon?: React.ReactNode;
|
|
|
children: TreeNodeData[];
|
|
children: TreeNodeData[];
|
|
|
deletedAt?: string | null;
|
|
deletedAt?: string | null;
|
|
@@ -24,7 +24,7 @@ export interface TreeNodeData {
|
|
|
export type ListNodeData = {
|
|
export type ListNodeData = {
|
|
|
key: string;
|
|
key: string;
|
|
|
title: string | React.ReactNode;
|
|
title: string | React.ReactNode;
|
|
|
- title_text?: string | React.ReactNode;
|
|
|
|
|
|
|
+ title_text?: string;
|
|
|
level: number;
|
|
level: number;
|
|
|
children?: number;
|
|
children?: number;
|
|
|
deletedAt?: string | null;
|
|
deletedAt?: string | null;
|
|
@@ -180,6 +180,7 @@ const EditableTreeWidget = ({
|
|
|
_node.forEach((value, index, array) => {
|
|
_node.forEach((value, index, array) => {
|
|
|
if (value.id === updatedNode.id) {
|
|
if (value.id === updatedNode.id) {
|
|
|
array[index].title = updatedNode.title;
|
|
array[index].title = updatedNode.title;
|
|
|
|
|
+ array[index].title_text = updatedNode.title_text;
|
|
|
console.log("key found");
|
|
console.log("key found");
|
|
|
return;
|
|
return;
|
|
|
} else {
|
|
} else {
|
|
@@ -387,6 +388,7 @@ const EditableTreeWidget = ({
|
|
|
rootClassName="draggable-tree"
|
|
rootClassName="draggable-tree"
|
|
|
draggable
|
|
draggable
|
|
|
blockNode
|
|
blockNode
|
|
|
|
|
+ selectable={false}
|
|
|
onDragEnter={onDragEnter}
|
|
onDragEnter={onDragEnter}
|
|
|
onDrop={onDrop}
|
|
onDrop={onDrop}
|
|
|
onSelect={(selectedKeys: Key[]) => {
|
|
onSelect={(selectedKeys: Key[]) => {
|