modular-forms icon indicating copy to clipboard operation
modular-forms copied to clipboard

initialValues is not submit when Field not exist in DOM

Open vincehi opened this issue 9 months ago • 5 comments

One thing I find very odd is that an initialValues that is not in the DOM will not be submitted. It's not intuitive at all. I think this is due to the active field. I couldn't find anything in the documentation to submit my field which is in the initialValues but not in the DOM.

vincehi avatar Mar 25 '25 11:03 vincehi

Does shouldActive={false} on the <Form /> component work?

fabian-hiller avatar Mar 25 '25 13:03 fabian-hiller

Fait shouldActive={false}sur le <Form />travail des composants ?

Unfortunately, this doesn't change anything

vincehi avatar Mar 25 '25 14:03 vincehi

Yeah same issue, I set initial values via useEffect and setValues but when trying to typing into to the input don't change value.

randomizeduser2 avatar Mar 27 '25 19:03 randomizeduser2

Not sure if your issue is related because you can only type into an <input /> if it exists in the DOM.

fabian-hiller avatar Mar 31 '25 01:03 fabian-hiller

@vincehi feel free to provide a minimal reproduction via StackBlitz. This should be fixable.

fabian-hiller avatar Mar 31 '25 01:03 fabian-hiller