portal

2025-02-02T08:08:08.331129Z

Hello, is there a way to have the inspector viewer show data NOT expanded using metadata or other code? Current situation: • Datafying value adds correct nav metadata • Navving creates new table where some values in table are larger vectors (for some 1 to many relationships in datomic • 'portal.api/eval-str "(portal.ui.commands/toggle ....' does do something like i want, but works only on selected values • Top level is viewed as table (with-meta ...) • Value in column is viewed as inspector (datafy ... (with-meta (datafy ....) • table is too big now.... Perhaps theres some metadata i can add whilst datafying? kind regards, Dieter

2025-02-04T18:06:51.336199Z

thanks for the reply. I'd prefer to see the column though, just not by default the expanded values. Gonna think a bit to hack around the issue. I'll post a workaround if I find one and I remember this post ;)

djblue 2025-02-04T18:15:23.022949Z

Actually, I forgot about something that isn't yet documented in portal as I haven't tested it a bunch yet so you may run into issues, but maybe something like the following might work:

(with-meta
  [{:key :value
    :another
    (with-meta
      [{:key :value}
       {:key :value}
       {:key :value}]
      {:portal.viewer/inspector {:expanded 0}})}]
  {:portal.viewer/default :portal.viewer/table})   

2025-02-04T18:17:44.897829Z

ah, nice. I'll give it a try, thank you

djblue 2025-02-02T23:38:36.976609Z

Portal doesn’t have something like that. An alternative option that might solve your problem would be to use the select-columns command to remove the field while inspecting the table in portal.