mirror of
https://github.com/penpot/penpot.git
synced 2026-08-05 20:38:38 +00:00
🐛 Fix shape operations on sidebar when using interaction observer
This commit is contained in:
parent
c5f03d711a
commit
bb0e9b47cb
@ -422,7 +422,8 @@
|
|||||||
(reset! observer-var nil))))
|
(reset! observer-var nil))))
|
||||||
|
|
||||||
;; Re-observe sentinel whenever children-count changes (sentinel moves)
|
;; Re-observe sentinel whenever children-count changes (sentinel moves)
|
||||||
(mf/with-effect [children-count expanded?]
|
;; and (shapes item) to reconnect observer after shape changes
|
||||||
|
(mf/with-effect [children-count expanded? (:shapes item)]
|
||||||
(let [total (count (:shapes item))
|
(let [total (count (:shapes item))
|
||||||
node (mf/ref-val ref)
|
node (mf/ref-val ref)
|
||||||
scroll-node (dom/get-parent-with-data node "scroll-container")
|
scroll-node (dom/get-parent-with-data node "scroll-container")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user