fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
exit2 2020-12-01T15:46:41.022400Z

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.

tony.kay 2020-12-01T15:54:23.023Z

@njj but when you print the props of the parent they print on each change but have the old values?

exit2 2020-12-02T20:26:49.038200Z

it’s on the list, just need to find the time amongst features

exit2 2020-12-02T20:27:18.039100Z

I may not be able to migrate easily 😅. It might be a new app and porting stuff over

exit2 2020-12-01T15:56:58.023800Z

The parent props don’t seem to be changing onChange of the subform

exit2 2020-12-01T15:57:39.024100Z

The form values are an array, so its something like:

exit2 2020-12-01T15:58:25.024300Z

(mapv #(ui-price-form (prim/computed % {:edit-mode? listing-edit?})) prices)

exit2 2020-12-01T15:58:57.024500Z

where the query in the parent is, {:prices (prim/get-query PriceField)}

tony.kay 2020-12-01T15:59:26.024700Z

what is your onChange?

exit2 2020-12-01T16:29:58.025Z

(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])})

exit2 2020-12-01T17:07:43.025200Z

@tony.kay Do you think it has to do with the onBlur?

exit2 2020-12-01T17:10:43.025400Z

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

2020-12-01T17:23:12.026300Z

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?

souenzzo 2020-12-01T17:59:12.028900Z

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

👍 1
tony.kay 2020-12-01T18:02:47.029100Z

what are you using for renderer? Did you change tx processing plugin?

tony.kay 2020-12-01T18:02:52.029300Z

no, I don’t think it is blur

tony.kay 2020-12-01T18:03:23.029500Z

#(m/set-string! this :value :event %)
The name of your field is an unqualified :value????

tony.kay 2020-12-01T18:03:42.029700Z

that is really confusing to my eye 😜

😆 1
tony.kay 2020-12-01T18:27:02.029900Z

Also, in f3 you do not need to quote txns

tony.kay 2020-12-01T18:27:28.030100Z

unless you’re using f2, in which case you’re using ident-optimized render and what you’re seeing is expected behavior

👍 1
nivekuil 2020-12-01T18:33:13.030500Z

what. I never knew.. I guess the book is misleading here? https://book.fulcrologic.com/#Transactions ctrl+f `[( has 73 matches

nivekuil 2020-12-01T18:37:42.031200Z

huh, the book actually does have api/delete-person called there without a quote. never noticed that. hope I'm not alone?

Björn Ebbinghaus 2020-12-01T18:50:05.031300Z

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.

tony.kay 2020-12-01T19:32:39.031500Z

right, I need to fix that. The new macro emits a function that emits its own form as data