fix: virtual list empty data warning

experiment/tanstack-table
Tienson Qin 2024-06-17 22:17:09 +08:00
parent 915ee5d67a
commit 2252b73d8d
1 changed files with 4 additions and 3 deletions

View File

@ -3489,7 +3489,7 @@
:bottom? bottom?})
(str (:container-id config) "-" (:db/id block)))))})]
(cond
virtualized?
(and virtualized? (seq blocks))
(ui/virtualized-list virtual-opts)
:else
(map-indexed (fn [idx block]
@ -3606,6 +3606,7 @@
(when-let [*ref (:scroll-container config)]
(rum/deref *ref))
(gdom/getElement "main-content-container"))]
(when (seq blocks)
(if (:sidebar? config)
(for [block blocks]
(rum/with-key
@ -3617,7 +3618,7 @@
:item-content (fn [idx]
(rum/with-key
(ref-block-container config (nth blocks idx))
(str "ref-" (:container-id config) "-" idx)))})))]
(str "ref-" (:container-id config) "-" idx)))}))))]
(and (:group-by-page? config)
(vector? (first blocks)))