Fork me on GitHub
#fulcro
<
2020-06-03
>
zilti13:06:55

...if that's even possible.

tony.kay16:06:08

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).

Jakub Holý (HolyJak)15:06:32

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 ?

currentoor15:06:42

one thing you could do is ignore the warning 😉

😂 4
currentoor16:06:11

jokes aside, what you're doing is what i thought you were supposed to do as well

currentoor16:06:30

and ignoring warnings is not the best solution

Jakub Holý (HolyJak)16:06:40

it worked for a while, with an older RAD

currentoor16:06:58

perhaps we should add an invisible flag to controls?

Jakub Holý (HolyJak)16:06:11

that is an option. But there are surely other possible, perhaps even better solutions? I liked the simplicity of just excluding it from :inputs ...

currentoor16:06:51

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

currentoor16:06:17

the warning is useful for people that want the control on the screen and cant figure out why it's not there

Jakub Holý (HolyJak)16:06:09

Perhaps :hidden? is better as it is used eg in CSS?

tony.kay16:06:01

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

tony.kay16:06:31

so, either way

❤️ 4
Jakub Holý (HolyJak)15:06:09

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"}) )

tony.kay16:06:59

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

👍 4
tony.kay16:06:26

You must use deferred routing and load it in the lambda of deferred

tony.kay16:06:09

If you’re using RAD, it should be handling that for you

tony.kay16:06:28

BUT, you don’t want route-to, you want form/edit! (if it is a form)

tony.kay16:06:51

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)

tony.kay16:06:10

or study the RAD form code and state machine and understand how to manage data lifecycles.

Jakub Holý (HolyJak)17:06:56

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.

Adrian Smith18:06:35

Inside a defsc component, we're given this and props what is this ?

Jakub Holý (HolyJak)19:06:41

As @U08E8UGF7 says. You can use it in many functions such as df/load!, comp/props etc

kszabo18:06:02

it’s self-reference for the instance of the defsc stateful-component

Richard22:06:28

Are there any examples of how you would this compared to props in defsc?

codonnell22:06:13

There are plenty in the book and videos (see channel topic)