0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

🐛 Fix z-index nillable input when static position

This commit is contained in:
Eva 2023-07-03 12:57:45 +02:00 committed by Alejandro Alonso
parent 94b5c98042
commit 8955f87d5a

View file

@ -192,6 +192,8 @@
(if (= align-self value)
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self nil}))
(st/emit! (dwsl/update-layout-child ids {:layout-item-align-self value}))))
is-absolute? (:layout-item-absolute values)
is-col? (every? ctl/col? selection-parents)
@ -219,6 +221,8 @@
on-change-position
(fn [value]
(when (= value :static)
(st/emit! (dwsl/update-layout-child ids {:layout-item-z-index nil})))
(st/emit! (dwsl/update-layout-child ids {:layout-item-absolute (= value :absolute)})))
on-change-z-index
@ -254,6 +258,8 @@
{:placeholder "--"
:on-focus #(dom/select-target %)
:on-change #(on-change-z-index %)
:nillable true
:disabled (not is-absolute?)
:value (:layout-item-z-index values)}]]]])
(when (not (:layout-item-absolute values))