From 3caa7e5566d378a54721f4685834a2f8f671d38e Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Tue, 26 Dec 2023 20:25:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(tree):=20=E9=98=BB=E6=AD=A2=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=A1=86=E6=8B=96=E6=8B=BD=E9=BB=98=E8=AE=A4=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA=20(#2697)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/gorgeous-timers-hang.md | 5 +++++ .changeset/real-points-jump.md | 5 +++++ packages/ui/tree/src/use-tree-action.tsx | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 .changeset/gorgeous-timers-hang.md create mode 100644 .changeset/real-points-jump.md diff --git a/.changeset/gorgeous-timers-hang.md b/.changeset/gorgeous-timers-hang.md new file mode 100644 index 000000000..cd02eb249 --- /dev/null +++ b/.changeset/gorgeous-timers-hang.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(tree): 修复编辑框内容无法选中问题 diff --git a/.changeset/real-points-jump.md b/.changeset/real-points-jump.md new file mode 100644 index 000000000..1fcb782a9 --- /dev/null +++ b/.changeset/real-points-jump.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/tree": patch +--- + +fix: 修复编辑框内容无法选中问题 diff --git a/packages/ui/tree/src/use-tree-action.tsx b/packages/ui/tree/src/use-tree-action.tsx index f9729a409..c23abae67 100644 --- a/packages/ui/tree/src/use-tree-action.tsx +++ b/packages/ui/tree/src/use-tree-action.tsx @@ -431,6 +431,9 @@ const EditableNodeInput = (props: EditableNodeInputProps) => { value={inputValue} onChange={handleChange} onKeyDown={onKeydown} + // hotfix: https://github.com/XiaoMi/hiui/issues/2697 + draggable + onDragStart={(evt) => evt.preventDefault()} />