Skip to content

Commit 871358c

Browse files
committed
Fixed signature for submit
1 parent b2a81c2 commit 871358c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Headlines: Added, Changed, Deprecated, Removed, Fixed, Security
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [2.5.0] - 2024-02-21
99

1010
### Added
1111

@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
### Fixed
1616

17+
- Type parameter was missing in `ChangeEvent`, which should be of the inferred schema type.
1718
- Type for `onChange.paths` wasn't strongly typed to `FormPath`.
1819
- Initial data was dereferenced after calling `superForm`, so it wasn't possible to update it when using `reset`.
1920
- `FormOptions` type required a type parameter that should've been defaulted to `Record<string, unknown>`.

src/lib/client/superForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export type SuperForm<
231231
enhance: (el: HTMLFormElement, events?: SuperFormEvents<T, M>) => ReturnType<typeof enhance>;
232232
isTainted: (path?: FormPath<T> | TaintedFields<T> | boolean) => boolean;
233233
reset: (options?: ResetOptions<T>) => void;
234-
submit: (submitter?: HTMLButtonElement | HTMLInputElement | null) => void;
234+
submit: (submitter?: HTMLElement | null) => void;
235235

236236
capture: Capture<T, M>;
237237
restore: T extends T ? Restore<T, M> : never;

0 commit comments

Comments
 (0)