fulcro

Yaw Odame 2025-04-11T15:45:38.598359Z

Wondering if the fo/triggers {:on-change (fn [])} should trigger when a subform field changes?

tony.kay 2025-04-11T21:18:23.219439Z

yess….but I think perhaps it fires on the subform UI class itself? Don’t remember if it ONLY fires on the top, or spread out. It’s one or the other. My vague memory is that since the state machine is ONLY on the top-level form, that triggers are ONLY on the currently active top-level form.

Yaw Odame 2025-05-02T22:33:08.963119Z

@tony.kay Run into the derive-fields form triggers case again. After reading the source code, it appears the ::form/apply-derived-calculations function is only called when the form UISM enters the :state/editing state. Should it or can it be called after the form is loaded? I have a PR ready but wondering if that flow makes sense before submitting.

Yaw Odame 2025-05-02T23:30:02.441469Z

Ignore this. I went a different route.

Yaw Odame 2025-05-04T13:26:30.026459Z

It is not called after the load currently. I'll send over the PR.

tony.kay 2025-05-04T05:48:28.555959Z

One can make an argument that it should be called at least once after the load to make sure derive feels are correct. Is it not?