Are you submitting a bug report or a feature request?
Feature request
What is the current behavior?
I'm unable to add custom form state, which I can subscribe to.
What is the expected behavior?
I'd like to be able to add a form state value with all fieldnames which only changes when the count of fields change. This way, I can subscribe to changes in the amount of fields. I currently am trying to use a custom mutator which adds this to the state and running this mutator from a FormSpy which is subscribed to modified.
The above seems to work, I see the state changes when using console.log() on the state in the first FormSpy, though my second formspy never gets executed. I'm suspecting that this is simply not a feature at this point?
Disclaimer: I'm aware that indexFieldnames in this setup would retrigger subscription every time it is run since I'm unconditionally altering the state, but I'll be checking for changes and only then altering the state as soon as the subscription works.
Are you submitting a bug report or a feature request?
Feature request
What is the current behavior?
I'm unable to add custom form state, which I can subscribe to.
What is the expected behavior?
I'd like to be able to add a form state value with all fieldnames which only changes when the count of fields change. This way, I can subscribe to changes in the amount of fields. I currently am trying to use a custom mutator which adds this to the state and running this mutator from a
FormSpy
which is subscribed tomodified
.The above seems to work, I see the state changes when using
console.log()
on the state in the firstFormSpy
, though my second formspy never gets executed. I'm suspecting that this is simply not a feature at this point?Disclaimer: I'm aware that
indexFieldnames
in this setup would retrigger subscription every time it is run since I'm unconditionally altering the state, but I'll be checking for changes and only then altering the state as soon as the subscription works.What's your environment?
React final form 6.3.0 Final form 4.18.5