mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 09:56:31 +00:00
Lazy load blocks in references and queries
This commit is contained in:
@@ -3475,12 +3475,11 @@
|
||||
1. References.
|
||||
2. Custom queries."
|
||||
[block config]
|
||||
(if (or (:ref? config)
|
||||
(:custom-query? config))
|
||||
(and
|
||||
(seq (:block/children block))
|
||||
(or
|
||||
(:custom-query? config)
|
||||
(>= (:ref/level block)
|
||||
(state/get-ref-open-blocks-level))))
|
||||
(util/collapsed? block)))
|
||||
(or
|
||||
(and
|
||||
(:ref? config)
|
||||
(>= (inc (:block/level block))
|
||||
(state/get-ref-open-blocks-level))
|
||||
;; has children
|
||||
(first (:block/_parent (db/entity (:db/id block)))))
|
||||
(util/collapsed? block)))
|
||||
|
||||
Reference in New Issue
Block a user