0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 11:38:24 -05:00

Reinitialize the align index on settings change.

This commit is contained in:
Andrey Antukh 2016-04-13 20:46:35 +03:00
parent be446c6d79
commit 10d38fd574
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -12,6 +12,7 @@
[uxbox.constants :as c]
[uxbox.rstore :as rs]
[uxbox.data.pages :as udp]
[uxbox.data.workspace :as udw]
[uxbox.ui.icons :as i]
[uxbox.ui.mixins :as mx]
[uxbox.ui.lightbox :as lightbox]
@ -28,6 +29,8 @@
;; --- Form Component
;; TODO: proper implement form validation
(defn- settings-form-render
[own]
(let [local (:rum/local own)
@ -47,7 +50,8 @@
(on-submit [event]
(dom/prevent-default event)
(let [page (assoc page :options opts)]
(rs/emit! (udp/update-page-metadata page))
(rs/emit! (udp/update-page-metadata page)
(udw/initialize-alignment-index (:id page)))
(lightbox/close!)))]
(html
[:form {:on-submit on-submit}