This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-27
Channels
- # aws (19)
- # babashka (47)
- # beginners (111)
- # boot (3)
- # bristol-clojurians (3)
- # chlorine-clover (2)
- # cider (13)
- # cljs-dev (8)
- # clojure (143)
- # clojure-europe (11)
- # clojure-germany (10)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-spec (6)
- # clojure-survey (3)
- # clojure-uk (42)
- # clojurescript (229)
- # conjure (131)
- # cursive (21)
- # data-science (18)
- # datomic (4)
- # emacs (21)
- # events (2)
- # figwheel-main (12)
- # fulcro (18)
- # graalvm (1)
- # hoplon (40)
- # jobs (1)
- # joker (17)
- # kaocha (1)
- # lambdaisland (1)
- # off-topic (19)
- # rdf (7)
- # re-frame (31)
- # reagent (26)
- # reitit (20)
- # rum (4)
- # shadow-cljs (106)
- # sql (17)
- # testing (5)
- # vim (2)
yeah, dynamic queries are a little tricky… I should have mentioned that earlier…it passed through my mind but I was in a hurry
No problem! it is also in the book so I should have been more careful checking against that too
@tony.kay Would you be interested in a PR to add a support for overriding the default formatter of a column based on its type, similarly as e.g. [:com.fulcrologic.rad.form/type->style->control :instant :default]
can be used for a form? (I see it is currently hardcoded in com.fulcrologic.rad.report/formatted-column-value
)
@tony.kay I have put together a draft of the change here https://github.com/fulcrologic/fulcro-rad/pull/33 - any comments? If not then I will go on to test it properly before removing the WIP marker. Thank you!
@holyjak I am interested in solving the problem of defaults for that yes, and a PR would be great. You’re thinking of putting the lambda to do the formatting in the UI control map? That actually seems pretty reasonable, since you might want to return react elements.
No, I haven't. You could expect that users want the same kind of data displayed in the same way in a report and a read-only field (yet be able to change that). On the other hand some "views" might perhaps be really tuned for a report and unsuitable for a form...
at the moment I’m relying on the form inputs themselves to have a read-only mode…and I think that is probably right. What you’re dealing with is strictly reports
Is :componentDidMount
the right place to conditionally load-field! data of the component (excluded from the initial load! via :without) based on the values of some of its props? (imagine a Department component that only loads its Teachers if it isn't the dept of Secrecy)
what happens when it gets passed new props after mounting that should trigger the change?
Good point. But the props do not change so that is not an issue here. (If it was possible for them to change - would the load need to be in the will update lifecycle hook or....?)
Thank you!
I am trying to find out how to do this: I want to add a row action to a RAD report that fetches and displays some additional info in a popup.
In normal Fulcro, the popup's query would be included in the parent's query and excluded from load! via :without
. But I (think I) can't do that with the report. Can I load! the data to a well known location such as :current/details
and have a link query [{[:current/details '_] [:details/info1 :details/more-info]}]
in the popup component? It would effectively be outside the normal data tree, reading directly from the root DB...