Fork me on GitHub
Karol Wójcik08:03:58

I'm taking a form with it's subform via (let [fields (fs/dirty-fields props false)] . This is cool, but how can convert the normalized fields to denormalized (joined) fields?


subforms in the form-state system are always components. Dirty/invalid is done at each subform component, so the props are already relative.


At the “top level” you should only care about the field that are explicitly there, or that something is wrong…the specifics are handled lower down in the subform components


Otherwise you’d have a huge mess of path info to deal with. You’re certainly welcome to hand-write form handling library yourself and switch it around to something you prefer 😄

Karol Wójcik09:03:47

I'm sorry. I feel like I haven't expressed myself sufficiently. I use dirty fields in the transact!'s mutation (as shown in the docstring of dirty-fields). However, I would like the dirty-fields to not be normalized, but rather denormalized when I send them over the wire.


Not sure why you'd want to do that... You can always pass whatever you want in a mutation... So pass the demonstrated props from the ui