Closed RokLenarcic closed 6 years ago
Thanks for the repro case. I'll look into it probably later today. May be related to #116. I have not confirmed where that one messes up entirely yet either.
Confirmed. It looks like follow on reads got disconnected in transact! somehow...
Fixed in 2.0.1
I've found one major and one minor issue when working with forms.
Here's steps to reproduce:
Create a new fulcro project using
lein new fulcro
.Open project.clj and change fulcro version to
2.1.0-SNAPSHOT
(although it may also be present in previous versions)Open
root.cljc
and add require[fulcro.ui.forms :as f]
.Replace
root.cljc
content below ns declaration with:Let's take a moment here to examine what is being done. We have an inner form which edits two properties, name and active. Name is being edited through built-in forms input field and active boolean is being edited through the button and a custom mutation. We have a top-level form which has a div that is dependent on both properties. For that to work it needs to re-render whenever they change which is accomplished by reading
f/form-root-key
.Run the client and server. Open fulcro inspect. You'll see that DB is what you'd expect.
Here's the unexpected:
Writing in the input box doesn't change the text in the top-form div, because it's not re-rendered. If you open fulcro-inspect you'll see that DB is being updated correctly and the transactions tab will show that transactions are being done with correct follow-up reads on
f/form-root-key
.If you click the button instead, you'll see that the text in top-form div updates as expected and flips between
!
/#
.Now here's the other weird behaviour: even though, unlike the input box, button works as expected, its transactions never show up in fulcro inspect transaction tab (???).