I have a subform that is setup via comp/get-query
but it seems that the props
of the parent aren’t reflecting the updated values of the subform, while the app state for that subform’s ident does.
@njj but when you print the props of the parent they print on each change but have the old values?
it’s on the list, just need to find the time amongst features
I may not be able to migrate easily 😅. It might be a new app and porting stuff over
The parent props don’t seem to be changing onChange of the subform
The form values are an array, so its something like:
(mapv #(ui-price-form (prim/computed % {:edit-mode? listing-edit?})) prices)
where the query in the parent is, {:prices (prim/get-query PriceField)}
what is your onChange?
(dom/input
:.form-control
{:type "text"
:value value
:id value
:onChange #(m/set-string! this :value :event %)
:onBlur #(prim/transact! this `[(fs/mark-complete! ~{:entity-ident [:price/by-id _id]
:field :value})
:price/by-id])})
@tony.kay Do you think it has to do with the onBlur?
Although, I have seen callback methods passed via the computed props before for updating form values - but I didn’t that that would be necessary in this case.. Since each has its own set of values for the subform
The Fulcro developer's guide recommends java 1.8.x, but I'm running a java 11 openjdk build. What problems should I expect to see if I use java 11?
@ben.grabow AFIK there is no "direct problem", but some other common libraries of fulcro ecosystem, like #datomic, still recommends java8 Also, #shadow-cljs had some problems with newer JVM (I had a issue with the deprecation of nashorn for example). But shadow usually fix this kind of issue very fast (docs/templates/examples can't flow)
what are you using for renderer? Did you change tx processing plugin?
no, I don’t think it is blur
#(m/set-string! this :value :event %)
The name of your field is an unqualified :value
????that is really confusing to my eye 😜
Also, in f3 you do not need to quote txns
unless you’re using f2, in which case you’re using ident-optimized render and what you’re seeing is expected behavior
https://book.fulcrologic.com/fulcro2/#_composition_and_rendering_refresh
what. I never knew.. I guess the book is misleading here? https://book.fulcrologic.com/#Transactions ctrl+f `[( has 73 matches
huh, the book actually does have api/delete-person
called there without a quote. never noticed that. hope I'm not alone?
Like Tony said in Fulcro 3 you don’t have to quote, but you still can. (Calling Mutations just returns a quoted version of them) Many examples in the book are from Fulcro 2 where you had to quote.
right, I need to fix that. The new macro emits a function that emits its own form as data