I've been working on writing a custom MultiWidget Widget. However, I ran into a snag that the keys of the inputs were not in valueFromData's data argument unless they were explicitly interacted with. Once you gave a multiwidget's input focus and blurred, then the key/val for that specific input was available in the form.data argument, but no others of the same MultiWidget.
I tested this behavior on the stock SplitDateTimeWidget and it feels similar. My guess is that the fields are not being initialized in the state tracking of the form? This is evidenced when focusing in some other field. It does appear that decompress is being called initially to populate the field, but it just seems like it isn't being put in the virtual dom perhaps?
I have controlled: true on my form with onChange: this.forceUpdate.bind(this)
I'm not sure if this is a bug or a newbie issue.
Update: As per my followup below, this is happening on the "all fields" example as well when modified to have initial data.
I've been working on writing a custom MultiWidget Widget. However, I ran into a snag that the keys of the inputs were not in valueFromData's data argument unless they were explicitly interacted with. Once you gave a multiwidget's input focus and blurred, then the key/val for that specific input was available in the form.data argument, but no others of the same MultiWidget.
I tested this behavior on the stock SplitDateTimeWidget and it feels similar. My guess is that the fields are not being initialized in the state tracking of the form? This is evidenced when focusing in some other field. It does appear that decompress is being called initially to populate the field, but it just seems like it isn't being put in the virtual dom perhaps?
I have controlled: true on my form with onChange: this.forceUpdate.bind(this)
I'm not sure if this is a bug or a newbie issue.
Update: As per my followup below, this is happening on the "all fields" example as well when modified to have initial data.