mirror of
https://github.com/penpot/penpot.git
synced 2025-02-20 22:06:07 -05:00
Reinitialize the align index on settings change.
This commit is contained in:
parent
be446c6d79
commit
10d38fd574
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
[uxbox.constants :as c]
|
[uxbox.constants :as c]
|
||||||
[uxbox.rstore :as rs]
|
[uxbox.rstore :as rs]
|
||||||
[uxbox.data.pages :as udp]
|
[uxbox.data.pages :as udp]
|
||||||
|
[uxbox.data.workspace :as udw]
|
||||||
[uxbox.ui.icons :as i]
|
[uxbox.ui.icons :as i]
|
||||||
[uxbox.ui.mixins :as mx]
|
[uxbox.ui.mixins :as mx]
|
||||||
[uxbox.ui.lightbox :as lightbox]
|
[uxbox.ui.lightbox :as lightbox]
|
||||||
|
@ -28,6 +29,8 @@
|
||||||
|
|
||||||
;; --- Form Component
|
;; --- Form Component
|
||||||
|
|
||||||
|
;; TODO: proper implement form validation
|
||||||
|
|
||||||
(defn- settings-form-render
|
(defn- settings-form-render
|
||||||
[own]
|
[own]
|
||||||
(let [local (:rum/local own)
|
(let [local (:rum/local own)
|
||||||
|
@ -47,7 +50,8 @@
|
||||||
(on-submit [event]
|
(on-submit [event]
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
(let [page (assoc page :options opts)]
|
(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!)))]
|
(lightbox/close!)))]
|
||||||
(html
|
(html
|
||||||
[:form {:on-submit on-submit}
|
[:form {:on-submit on-submit}
|
||||||
|
|
Loading…
Add table
Reference in a new issue