mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: bindings on initialization
This commit is contained in:
@@ -138,7 +138,8 @@
|
||||
(when-let [^js api (gobj/get tln "api")]
|
||||
(p/then (when populate-onboarding?
|
||||
(whiteboard-handler/populate-onboarding-whiteboard api))
|
||||
#(do (state/focus-whiteboard-shape tln block-id)
|
||||
#(do (whiteboard-handler/cleanup! (.-currentPage tln))
|
||||
(state/focus-whiteboard-shape tln block-id)
|
||||
(set-loaded-app tln))))))]
|
||||
(rum/use-effect! (fn []
|
||||
(when (and loaded-app block-id)
|
||||
|
||||
@@ -361,6 +361,11 @@
|
||||
[^js api ids]
|
||||
(apply (.-selectShapes api) ids))
|
||||
|
||||
(defn cleanup!
|
||||
[^js tl-page]
|
||||
(let [shapes (.-shapes tl-page)]
|
||||
(.cleanup tl-page (map #(.-id %) shapes))))
|
||||
|
||||
(defn update-bindings!
|
||||
[^js tl-page page-name]
|
||||
(when-let [page (db/entity [:block/name page-name])]
|
||||
|
||||
Reference in New Issue
Block a user