Skip to content

Commit

Permalink
fix(tree): 阻止编辑框拖拽默认行为 (#2697)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyprepare committed Dec 26, 2023
1 parent 558b259 commit 3caa7e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-timers-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": patch
---

fix(tree): 修复编辑框内容无法选中问题
5 changes: 5 additions & 0 deletions .changeset/real-points-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/tree": patch
---

fix: 修复编辑框内容无法选中问题
3 changes: 3 additions & 0 deletions packages/ui/tree/src/use-tree-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
/>
<span className={`${prefixCls}__action`}>
<IconButton
Expand Down

0 comments on commit 3caa7e5

Please sign in to comment.