Fork me on GitHub
#reveal
<
2022-04-07
>
sheluchin11:04:36

Is there any way for an action to take an additional argument? e.g. if I want an action on maps that calls (get *v <additional-kw-arg>), is that possible?

vlaaad11:04:15

Where do you want to pass this extra arg?

sheluchin11:04:03

Anywhere :man-shrugging: I guess Reveal forms would be one way to do it. I'm looking for a workflow where I can click some element in the Reveal window -> pick the action -> add an additional argument. Background: what I'm trying to do is make an action to use with https://github.com/wilkerlucio/pathom3/blob/main/src/main/com/wsscode/pathom3/interface/eql.cljc#L79-L82=, whereby a selected map is used as the entity map and I can give it an attribute to look up.

vlaaad15:04:27

Sounds like a job for a tree view

vlaaad15:04:18

Have a look at tree-view

sheluchin15:04:49

Thank you, I'll check out how it might apply.

vlaaad15:04:42

but that works if you have an enumeration of all possible attrs…

sheluchin15:04:56

I think it's doable with https://pathom3.wsscode.com/docs/indexes/#index-io > for given attribute set (with empty, one or more items), which attributes are directly reachable (one resolver distance) from that set. So get the entity map keys and figure out possible attrs from there. I think it's a little more advanced than I want to try right now, but I'll put it on my list and will get to it at some point.