mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 17:27:19 +02:00
🐛 Fix edit theme form auto submitting when pressing checkbox (II)
This commit is contained in:
parent
030f074285
commit
c8146cf0fe
1 changed files with 4 additions and 3 deletions
|
@ -119,6 +119,7 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/stop-propagation event)
|
(dom/stop-propagation event)
|
||||||
(when-not editing?'
|
(when-not editing?'
|
||||||
|
(on-toggle set-name)
|
||||||
(on-select tree-path))))
|
(on-select tree-path))))
|
||||||
|
|
||||||
on-context-menu
|
on-context-menu
|
||||||
|
@ -132,6 +133,7 @@
|
||||||
(wdt/show-token-set-context-menu
|
(wdt/show-token-set-context-menu
|
||||||
{:position (dom/get-client-position event)
|
{:position (dom/get-client-position event)
|
||||||
:tree-path tree-path})))))]
|
:tree-path tree-path})))))]
|
||||||
|
|
||||||
[:div {;; :ref dref
|
[:div {;; :ref dref
|
||||||
:role "button"
|
:role "button"
|
||||||
:data-testid "tokens-set-item"
|
:data-testid "tokens-set-item"
|
||||||
|
@ -154,9 +156,8 @@
|
||||||
:on-submit #(on-edit-submit set-name (ctob/update-name set %))}]
|
:on-submit #(on-edit-submit set-name (ctob/update-name set %))}]
|
||||||
[:*
|
[:*
|
||||||
[:div {:class (stl/css :set-name)} label]
|
[:div {:class (stl/css :set-name)} label]
|
||||||
[:button {:on-click (fn [event]
|
[:button {:on-click on-click
|
||||||
(dom/stop-propagation event)
|
:type "button"
|
||||||
(on-toggle set-name))
|
|
||||||
:class (stl/css-case :checkbox-style true
|
:class (stl/css-case :checkbox-style true
|
||||||
:checkbox-checked-style active?')}
|
:checkbox-checked-style active?')}
|
||||||
(when active?'
|
(when active?'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue