Fork me on GitHub
#fulcro
<
2023-03-29
>
Grimgog07:03:45

According to fulcro RAD: How to use form/field-visible? on a field? Ive tried

fo/field-visible?      {:member/inactive-date false}
for my :member/inactive-date that is defined as defattr in member. I would like to tag it true if :member/active is set to false and show the inactive date time in my form. Any suggestions?

Jakub Holý (HolyJak)11:03:30

On a form you need fields-visible?

Grimgog14:03:01

@U0522TWDA ah nice, thx that works. hm, if I use a fn on this, I only get "#object[Component [object Object]]" out of v - is this normal? How can I access now my data?

fo/fields-visible?      {:member/inactive-date (fn [v]
                                                                   (println (get :member/active? v))
                                                                   true)}

Jakub Holý (HolyJak)15:03:06

That is the this of the component

Jakub Holý (HolyJak)15:03:29

You need (comp/props this)

2