Migration guide: https://superforms.rocks/migration-v2
More detailed list of what's new: https://superforms.rocks/whats-new-v2
Added
- Type narrowing for
FormPath
and its relatives, to filter the paths based on a specific type, likeFormPathLeaves<T, Date>
. - Proxy types:
FieldProxy
,FormFieldProxy
andArrayProxy
. - Added
invalidateAll
option'force'
, to always use the load function form data, instead of the one returned from the form action. Useful when updating the form data partially, to ensure that the data is refreshed from the server (a "pessimistic" update compared to the default, which is optimistic). Setting this also bases thereset
function on the latest load function data returned for the form.
Fixed
defaults
didn't infer the input type, and didn't generate correctSuperValidated
data, makingsuperForm
confused. Also fixed type signature and removed thejsonSchema
option that wasn't applicable.- Using
goto
in events didn't work when the target page redirected. FormPath
andFormPathLeaves
didn't handle fields with typeunknown
andany
.- Missing boolean fields were valid in strict mode.