File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 438
438
(and (map? data) (sequential? (first (vals data)))) (normalize-map-of-seq opts data)
439
439
(and (sequential? data) (map? (first data))) (normalize-seq-of-map opts data)
440
440
(and (sequential? data) (sequential? (first data))) (viewer/normalize-seq-of-seq data)
441
+ (empty? data) {:rows []}
441
442
:else nil )
442
443
stats (compute-table-summary opts)
443
444
active-filters (compute-filters-data opts)
514
515
:autocomplete-data autocomplete-data
515
516
:state state})
516
517
(update :nextjournal/render-opts dissoc :computed-columns :pre-process-stats )
517
- (assoc :nextjournal/value (cond->> []
518
- (seq rows) (cons (viewer/with-viewer table-body-viewer (merge (-> applied-viewer
519
- (select-keys [:page-size ])
520
- (set/rename-keys {:page-size :nextjournal/page-size }))
521
- (select-keys wrapped-value [:nextjournal/page-size ]))
522
- (map (partial viewer/with-viewer table-row-viewer) rows)))
518
+ (assoc :nextjournal/value (cond->> [(viewer/with-viewer table-body-viewer (merge (-> applied-viewer
519
+ (select-keys [:page-size ])
520
+ (set/rename-keys {:page-size :nextjournal/page-size }))
521
+ (select-keys wrapped-value [:nextjournal/page-size ]))
522
+ (if (seq rows)
523
+ (map (partial viewer/with-viewer table-row-viewer) rows)
524
+ [(viewer/html [:span.italic " this table has no rows" ])]))]
523
525
head (cons (viewer/with-viewer (:name table-head-viewer table-head-viewer) head)))))
524
526
(-> wrapped-value
525
527
viewer/mark-presented
You can’t perform that action at this time.
0 commit comments