Hi! I got Portal to work in my dockerized Clojure instance today and so far I really like it. I am trying to get access to the values I navigate to in my REPL. According to https://cljdoc.org/d/djblue/portal/0.59.1/doc/ui-concepts/history, the values should be in the portal atom after navigation. However when I evaluate p (which i defined with (*def* p (p/open {:port 7123 :launcher :vs-code}))), this is the only value in there: {:session-id #uuid "2a331435-4c67-42e9-81bc-0fbe5a8b0b09"} . Am I misunderstanding how this should work?
@p will have the selected value, I think that's what you are looking for 👍
Oh wow, I just assumed it was a map based on the looks of it. Thanks anyway, works perfectly!
The value retuned from open is a record which implements the deref interface: https://github.com/djblue/portal/blob/master/src/portal/runtime/jvm/client.clj#L85-L86 so the confusion is totally understandable.
can I get all the values in the session as well (as opposed to first only)?
Like for multi-select?
Ah, I understand now. No I did not mean multi-select, I thought it would basically append all values that get selected over time to an ever growing list.
However, I am interested in how I can get the values from a multi-select
I understand I can copy them as edn, but sometimes I'd like the actual object (for instance when the value I am interested in is a Bytestream)
(portal.api/selected <portal-session-returned-by-open>) or (mapcat portal.api/selected (portal.api/sessions))
I think the above is what you would need
Great, thanks!