portal 2024-01-12

I'm trying to use https://cljdoc.org/d/djblue/portal/0.51.1/api/portal.viewer#table with the table rows as a vector of vectors.

(portal.api/submit
 (portal.viewer/table [[1 2]
                       [3 4]
                       [5 6]]
                      {:columns [:X :Y]}))
It looks like I'm doing something wrong with the column names. Any idea what I might be missing?

Oh thank you so much!

Ohh, currently the column metadata only works for map-of-maps or vector-of-maps.

Is this something you want to try?

Oh, I see, thanks. I misread the code an now you clarified it for me. 🙏 map-of-maps should be good enough for my case, thanks.

Some people here may find the following example useful. It is a self-contained tiny demo of how one may embed Portal views in a standalone HTML page. (It uses the https://github.com/scicloj/kind-portal adapter to support the https://scicloj.github.io/kindly/ convention, but you may simply remove this part if you are just interested in embedding Portal as-is.) Rendered page: https://scicloj.github.io/kind-portal/demo.html Source script: https://github.com/scicloj/kind-portal/blob/main/examples/standalone_html.clj

2