You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The two means to provide initialValues are not consistent on updates (eg: after a successful submit):
config property initialValues ignores any updates after the initial call.
input value prop visually reacts to updates but the underlying form data is not updated.
Describe the solution you'd like
I would like the initialValues to accept an accessor in the shape of an accessor function:
initialValues: ()=>({myField: data().myField,})
That is evaluated in a solid-jscreateEffect.
My current workaround is:
it does react to subsequent changes to the initial state
it does reset the dirty flag (which the prop value does not)
it does update the underlying form data (which the prop value does not)
Cons:
Still not consistent with the value behavour
This could easily be added to @felte/solid create-form, given that it is a behaviour that would be coherent with the rest of the project. But I fear this shortcuts behaviours from the core package.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The two means to provide
initialValues
are not consistent on updates (eg: after a successful submit):initialValues
ignores any updates after the initial call.value
prop visually reacts to updates but the underlying form data is not updated.Describe the solution you'd like
I would like the
initialValues
to accept an accessor in the shape of an accessor function:That is evaluated in a solid-js
createEffect
.My current workaround is:
Its benefits are:
value
does not)value
does not)Cons:
value
behavourThis could easily be added to
@felte/solid create-form
, given that it is a behaviour that would be coherent with the rest of the project. But I fear this shortcuts behaviours from the core package.The text was updated successfully, but these errors were encountered: