This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-08
Channels
- # announcements (42)
- # aws (2)
- # babashka (69)
- # beginners (38)
- # calva (18)
- # cider (39)
- # circleci (1)
- # clj-commons (10)
- # cljs-dev (2)
- # clojure (36)
- # clojure-australia (14)
- # clojure-europe (25)
- # clojure-gamedev (40)
- # clojure-losangeles (4)
- # clojure-nl (5)
- # clojure-sweden (1)
- # clojure-uk (5)
- # clojurescript (133)
- # core-logic (24)
- # cursive (7)
- # datalevin (4)
- # datascript (3)
- # figwheel-main (1)
- # fulcro (45)
- # honeysql (1)
- # integrant (43)
- # introduce-yourself (1)
- # jobs (4)
- # leiningen (3)
- # lsp (32)
- # nextjournal (9)
- # pathom (18)
- # polylith (21)
- # portal (65)
- # re-frame (6)
- # releases (1)
- # remote-jobs (1)
- # reveal (12)
- # rewrite-clj (1)
- # sci (84)
- # tools-deps (22)
Good morning, I must be missing something, please help. The first set of statements print on the REPL, the second set, after the (swap! ...
block do not, why? I thought that each block within (do
should execute till the end?
Ahhh, got it, thank you ...
Do the tabular RAD reports have a mechanism for performing an action on row click (without adding controls) or is that just handled by defining your own row UI with an :onClick
function? I want to to have the tabular report show a graph in a separate div when a row is clicked. A component with a router would be one way, but I'm wondering if RAD has something for it that I'm missing in ro
.
no. The default state machine uses row clicks to select (highlight) the row, and there is currently no additional hook
but it seems a reasonable thing to have a hook for. I'm in the code of RAD right now. I'll add a task marker to add such a hook
that doesn't interfere with the entire row...I'll still add one for clicking on the row itself
Yeah, I was wondering about that one. So the function part is self explanatory, but what would the key be? If I wanted it to apply to the whole row, just use the same fn on all the column names?
Gotcha. That's good enough for my current needs, but it does seem like hook support for the entire row would be helpful. Thank you!
Also, using ro/links
wraps the column text in an a
tag, which may not be desirable. It makes sense for a single-column action but as a workaround for the per-row action the wrapping is not desirable. I'm sure you're aware of this but wanted to point it out while we're talking about the options.
I just pushed a rad-1.1 branch on RAD and SUI plugin. If you use deps, you can try latest commits on those branches to get the on-row-select
I'm doing a bit of refactoring, so I'd be interested to know if anything breaks. Mainly I made an optimized wrapper for form fields, which if I screwed something up might break subtle things, like validation messageson fields or something. See with-field-context
and I also exposed more helpers for when you want to take control of rendering a form
I'm not making use of any forms so far, just doing some scraping and building reports from the data. Afraid I won't be of much help to test forms at the moment.
no worries. I'll get to testing it. Just wanted you to try your report link and see if that does it for you
Yep, looks like exactly what I was asking about. I don't understand how you get that implemented so quickly but I sure am grateful for it.
😄 You just happened to hit me while I was about to do a commit related to forms in both those libs.
How would I use render props https://reactjs.org/docs/render-props.html with a react component in Fulcro. I want to use https://headlessui.dev/react/disclosure with the open prop.
You mean use their React component in a Fulcro component and have it render another Fulcro component?
Have a look at comp/with-parent-context in https://book.fulcrologic.com/#_fulcro_and_react_hoc
See comp/with-parent-context In https://book.fulcrologic.com/#ReactMotion - could that help?
Thanks both.
You can also use the hooks ns with things like use-component to create raw functions that act as components, then use low-level react factory. on that function. At that point it is pretty much 100% a React js component.
Has anyone else been able to get the cljs repl working with emacs for https://github.com/fulcrologic/fulcro-rad-demo? I keep getting
error in process filter: user-error: The shadow-cljs ClojureScript REPL is not available. Please check for details
and I'm not sure how to debug it. Please let me know if #shadow-cljs is a more appropriate place to ask this.Do other editors work? And yes, I would ask in #shadow-cljs or/and #cider
I don't have any other editors set up to work with Clojure, so I haven't tried. I'll check the other channels.
Have you got it fixed?
Nope, no progress. In #cider, bozhidar said it looks like it's not finding the shadow-cljs library. I'm not sure why though.
I figured it out. It turns out I was connecting to a clj repl insterad of a cljs one. I thought I was supposed to connect to a clj one and it would start a cljs repl, but I was wrong.
Glad to hear you figured it out!