mirror of
https://github.com/logseq/logseq.git
synced 2026-05-30 07:29:48 +00:00
fix: references
This commit is contained in:
@@ -3176,7 +3176,7 @@
|
||||
(when (seq breadcrumbs)
|
||||
[:div.breadcrumb.block-parents
|
||||
{:class (when (seq breadcrumbs)
|
||||
(str (when-not (:search? config)
|
||||
(str (when-not (or (:search? config) (:list-view? config))
|
||||
" my-2")
|
||||
(when indent?
|
||||
" ml-4")))}
|
||||
|
||||
@@ -1149,21 +1149,26 @@
|
||||
(let [item (util/nth-safe data idx)
|
||||
db-id (cond (map? item) (:db/id item)
|
||||
(number? item) item
|
||||
:else nil)]
|
||||
(when db-id
|
||||
(let [block-entity (db/entity db-id)
|
||||
[item set-item!] (hooks/use-state (when (:block.temp/fully-loaded? block-entity) block-entity))
|
||||
opts {:block-only? true
|
||||
:properties properties
|
||||
:skip-transact? (not block-entity)
|
||||
:skip-refresh? (not block-entity)}]
|
||||
(hooks/use-effect!
|
||||
(fn []
|
||||
(when (and db-id (not item))
|
||||
(p/let [block (db-async/<get-block (state/get-current-repo) db-id opts)]
|
||||
(set-item! block))))
|
||||
[db-id])
|
||||
(item-render (assoc item :id (:db/id item) :db/id (:db/id item)))))))
|
||||
:else nil)
|
||||
block-entity (when db-id (db/entity db-id))
|
||||
[item set-item!] (hooks/use-state (when (:block.temp/fully-loaded? block-entity) block-entity))
|
||||
opts {:block-only? true
|
||||
:properties properties
|
||||
:skip-transact? (not block-entity)
|
||||
:skip-refresh? (not block-entity)}]
|
||||
(hooks/use-effect!
|
||||
(fn []
|
||||
(when (and db-id (not item))
|
||||
(p/let [block (db-async/<get-block (state/get-current-repo) db-id opts)]
|
||||
(set-item! block))))
|
||||
[db-id])
|
||||
(item-render (cond
|
||||
(map? item)
|
||||
item
|
||||
(number? item)
|
||||
{:db/id item}
|
||||
:else
|
||||
nil))))
|
||||
|
||||
(rum/defc table-body < rum/static
|
||||
[table option rows *scroller-ref *rows-wrap set-items-rendered!]
|
||||
@@ -1225,7 +1230,7 @@
|
||||
(for [[first-block-id blocks] rows]
|
||||
[:div
|
||||
[:div.ml-2
|
||||
(breadcrumb config
|
||||
(breadcrumb (assoc config :list-view? true)
|
||||
(state/get-current-repo) first-block-id
|
||||
{:show-page? false})]
|
||||
(list-cp blocks)]))))
|
||||
|
||||
Reference in New Issue
Block a user