mirror of
https://github.com/penpot/penpot.git
synced 2026-07-31 18:36:18 +00:00
🐛 Fix double click on set name input (#7096)
This commit is contained in:
parent
8e0a6e4123
commit
ff2e845f2c
@ -28,6 +28,8 @@
|
|||||||
- Add the ability to show login dialog on profile settings [Github #6871](https://github.com/penpot/penpot/pull/6871)
|
- Add the ability to show login dialog on profile settings [Github #6871](https://github.com/penpot/penpot/pull/6871)
|
||||||
- Improve the application of tokens with object specific tokens [Taiga #10209](https://tree.taiga.io/project/penpot/us/10209)
|
- Improve the application of tokens with object specific tokens [Taiga #10209](https://tree.taiga.io/project/penpot/us/10209)
|
||||||
- Add info to apply-token event [Taiga #11710](https://tree.taiga.io/project/penpot/task/11710)
|
- Add info to apply-token event [Taiga #11710](https://tree.taiga.io/project/penpot/task/11710)
|
||||||
|
- Fix double click on set name input [Taiga #11747](https://tree.taiga.io/project/penpot/issue/11747)
|
||||||
|
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
:type "text"
|
:type "text"
|
||||||
:on-blur on-submit
|
:on-blur on-submit
|
||||||
:on-key-down on-key-down
|
:on-key-down on-key-down
|
||||||
:maxlength "256"
|
:max-length "256"
|
||||||
:auto-focus true
|
:auto-focus true
|
||||||
:placeholder (tr "workspace.tokens.set-edit-placeholder")
|
:placeholder (tr "workspace.tokens.set-edit-placeholder")
|
||||||
:default-value default-value}]))
|
:default-value default-value}]))
|
||||||
@ -210,7 +210,7 @@
|
|||||||
|
|
||||||
(mf/defc sets-tree-set*
|
(mf/defc sets-tree-set*
|
||||||
[{:keys [id set label tree-depth tree-path tree-index is-selected is-active is-draggable is-editing
|
[{:keys [id set label tree-depth tree-path tree-index is-selected is-active is-draggable is-editing
|
||||||
on-select on-drop on-toggle on-start-edition on-reset-edition on-edit-submit]}]
|
on-select on-drop on-toggle on-start-edition on-reset-edition on-edit-submit is-new]}]
|
||||||
|
|
||||||
(let [set-name (ctob/get-name set)
|
(let [set-name (ctob/get-name set)
|
||||||
can-edit? (mf/use-ctx ctx/can-edit?)
|
can-edit? (mf/use-ctx ctx/can-edit?)
|
||||||
@ -239,7 +239,11 @@
|
|||||||
:path tree-path})))))
|
:path tree-path})))))
|
||||||
|
|
||||||
on-double-click
|
on-double-click
|
||||||
(mf/use-fn (mf/deps id) #(on-start-edition id))
|
(mf/use-fn
|
||||||
|
(mf/deps id is-new)
|
||||||
|
(fn []
|
||||||
|
(when-not is-new
|
||||||
|
(on-start-edition id))))
|
||||||
|
|
||||||
on-checkbox-click
|
on-checkbox-click
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
@ -392,7 +396,7 @@
|
|||||||
:is-editing true
|
:is-editing true
|
||||||
:is-active true
|
:is-active true
|
||||||
:is-selected true
|
:is-selected true
|
||||||
|
:is-new true
|
||||||
:tree-path path
|
:tree-path path
|
||||||
:tree-depth depth
|
:tree-depth depth
|
||||||
:tree-index index
|
:tree-index index
|
||||||
@ -416,6 +420,7 @@
|
|||||||
:tree-path path
|
:tree-path path
|
||||||
:tree-depth depth
|
:tree-depth depth
|
||||||
:tree-index index
|
:tree-index index
|
||||||
|
:is-new false
|
||||||
:tree-parent-path parent-path
|
:tree-parent-path parent-path
|
||||||
:on-toggle on-toggle-set
|
:on-toggle on-toggle-set
|
||||||
:edition-id edition-id
|
:edition-id edition-id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user