This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-07
Channels
- # announcements (38)
- # asami (14)
- # beginners (35)
- # biff (3)
- # calva (29)
- # cider (20)
- # clj-kondo (7)
- # cljdoc (38)
- # clojure (64)
- # clojure-art (2)
- # clojure-australia (1)
- # clojure-dev (6)
- # clojure-europe (30)
- # clojure-nl (4)
- # clojure-spec (4)
- # clojure-uk (9)
- # clojured (3)
- # clojurescript (87)
- # cursive (17)
- # datahike (2)
- # datomic (10)
- # defnpodcast (2)
- # emacs (2)
- # events (1)
- # fulcro (25)
- # gratitude (1)
- # introduce-yourself (1)
- # jobs-discuss (21)
- # lsp (103)
- # malli (41)
- # meander (8)
- # minecraft (3)
- # missionary (3)
- # nextjournal (20)
- # off-topic (10)
- # pedestal (1)
- # polylith (15)
- # portal (6)
- # releases (2)
- # ring (1)
- # ring-swagger (2)
- # sci (4)
- # shadow-cljs (5)
- # spacemacs (3)
- # sql (11)
- # xtdb (3)
In the case of table with lots of columns, the "full" option does not use max width:
I know, hope I was going to fix it before anybody noticed 😅 https://github.com/nextjournal/clerk/blob/ec07ed2701fb82ecac94c786a1310d7e324cab18/src/nextjournal/clerk/viewer.cljc#L222
If I render a table from seq-of-maps, can I control column order ?
My frequent use case is to render a tmd dataset. It has a ->maps function, which looses column sorting ..
to also support things like https://github.com/clj-commons/ordered
I solved it by using use-headers
(defn ->table [df]
(->
(concat [(tc/column-names df)]
(tc/rows df :as-seqs))
clerk/use-headers
clerk/table))
So I think clerk itself does not need more. use-headers
is there.
I was just thinking that maybe use-headers
could become an option of table
instead of own function.
(clerk/table
{:headers [a b c]}
....
can also directly return a map with rows and head https://github.com/nextjournal/clerk/blob/main/src/nextjournal/clerk/viewer.cljc#L133
Hey @U7CAHM72M I think I ran into this same problem when trying to view a tmd dataset using clerk/table
.
So this is helpful!
I guess this also means that clerk/table
is the what we need to use to view a tmd dataset in clerk?
I tried this approach with a dataset that has a bunch of columns. It rendered like this:
Is there a way to force showing the full column name, and then just make it possible to scroll off to the right?