🐛 Fix flick on design tab after variant switch (#7116)

This commit is contained in:
Pablo Alba
2025-08-14 08:14:06 +02:00
committed by GitHub
parent 814ec43714
commit 2e277a39ca
2 changed files with 7 additions and 10 deletions

View File

@@ -987,16 +987,12 @@
all-parents (-> all-parents
(into parents-of-swapped)
(conj (:id new-shape)))]
(rx/merge
(rx/of
(dwu/start-undo-transaction undo-id)
(dch/commit-changes changes)
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
(dwu/commit-undo-transaction undo-id)
(dws/deselect-all))
(->> (rx/of (dws/select-shape (:id new-shape) false))
(rx/delay 1)))))))
(rx/of
(dwu/start-undo-transaction undo-id)
(dch/commit-changes changes)
(ptk/data-event :layout/update {:ids all-parents :undo-group undo-group})
(dwu/commit-undo-transaction undo-id)
(dws/select-shape (:id new-shape) false))))))
(defn component-multi-swap
"Swaps several components with another one"

View File

@@ -102,6 +102,7 @@
(mf/use-fn
(mf/deps on-change)
(fn [event]
(dom/stop-propagation event)
(let [node (dom/get-current-target event)
id (dom/get-data node "id")]
(reset! selected-id* id)