0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-20 05:34:23 -05:00

🐛 Fix edit theme form auto submitting when pressing checkbox (II)

This commit is contained in:
Andrés Moya 2024-11-25 16:50:08 +01:00 committed by Andrés Moya
parent 030f074285
commit c8146cf0fe

View file

@ -119,6 +119,7 @@
(fn [event]
(dom/stop-propagation event)
(when-not editing?'
(on-toggle set-name)
(on-select tree-path))))
on-context-menu
@ -132,6 +133,7 @@
(wdt/show-token-set-context-menu
{:position (dom/get-client-position event)
:tree-path tree-path})))))]
[:div {;; :ref dref
:role "button"
:data-testid "tokens-set-item"
@ -154,9 +156,8 @@
:on-submit #(on-edit-submit set-name (ctob/update-name set %))}]
[:*
[:div {:class (stl/css :set-name)} label]
[:button {:on-click (fn [event]
(dom/stop-propagation event)
(on-toggle set-name))
[:button {:on-click on-click
:type "button"
:class (stl/css-case :checkbox-style true
:checkbox-checked-style active?')}
(when active?'