This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-03
Channels
- # babashka (17)
- # beginners (166)
- # calva (97)
- # cider (4)
- # clara (2)
- # clj-kondo (46)
- # cljsrn (5)
- # clojure (334)
- # clojure-canada (1)
- # clojure-dev (144)
- # clojure-europe (14)
- # clojure-germany (5)
- # clojure-nl (10)
- # clojure-spec (1)
- # clojure-uk (46)
- # clojurescript (50)
- # conjure (1)
- # core-async (52)
- # core-typed (5)
- # cursive (3)
- # datomic (3)
- # emacs (11)
- # figwheel (16)
- # figwheel-main (9)
- # fulcro (29)
- # graalvm (19)
- # graphql (14)
- # helix (46)
- # hoplon (4)
- # hugsql (2)
- # jobs (2)
- # jobs-discuss (1)
- # juxt (15)
- # kaocha (6)
- # off-topic (9)
- # pedestal (7)
- # portkey (7)
- # re-frame (10)
- # reagent (29)
- # shadow-cljs (13)
- # spacemacs (70)
- # sql (13)
- # tools-deps (26)
- # xtdb (23)
Possible and intended. Details are in other thread. RAD lets you either define your own elements of rendering (i.e. layout) where the built-in inputs are used, or completely take over rendering (in which case you need to understand Fulcro form-state).
In RAD reports, how can I make input controls that are not displayed in the UI so that they can only be supplied via route parameters but not edited by the user? Previously I simply defined them in ro/controls
and did not mention them in ro/control-layout
but now I am getting a warning about that.
Is the only solution to define custom :style
or :type
(something like :hidden
) and register a custom rendering component such as (constantly nil)
in all-controls - :com.fulcrologic.rad.control/type->style->control
?
jokes aside, what you're doing is what i thought you were supposed to do as well
and ignoring warnings is not the best solution
it worked for a while, with an older RAD
perhaps we should add an invisible flag to controls?
that is an option. But there are surely other possible, perhaps even better solutions? I liked the simplicity of just excluding it from :inputs ...
oh i see, sounds like there shouldn't be a warning if and only if a control is missing from the layout and is marked invisible
the warning is useful for people that want the control on the screen and cant figure out why it's not there
Perhaps :hidden? is better as it is used eg in CSS?
controls have a visibility lambda….and you can ignore the warning…it is just there to keep ppl from complaining to me that their control didn’t show up
Can I create a dynamic routing target that loads its data in :componentDidMount
and has a dynamic ident (such as :person/id
)? I want to avoid deferred routing because it might be causing problems. But when I do this, dyn. routing fails with will-enter for router target Person did not return a valid ident. Instead it returned: [:person/id nil] I guess I am stuck? (I have just executed (routing/route-to! app Person {:person/id "123"})
)
IF you have a route parameter for a dynamic router, then you MUST either pre-load the entity in question (before routing), or at least fix the UI graph so that the ident in question is available (i.e. (merge-component! … Person {:person/id id})
), otherwise there is nothing to point to
If you’re trying to route to the display of a person, you’re also probably better off just defining it as a RAD form, and just take over the rendering (and not save it)
or study the RAD form code and state machine and understand how to manage data lifecycles.
Well, I am still troubleshooting my empty report problem and you mentioned there can be a problem with nested deferred routers so I tried to bypass it by making the middle router not using deferring.
Inside a defsc
component, we're given this
and props
what is this
?
As @U08E8UGF7 says. You can use it in many functions such as df/load!, comp/props etc
There are plenty in the book and videos (see channel topic)