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()} />