Skip to content

Commit 59e6f06

Browse files
committed
fix: resolve form submit button not calling onSubmit
ButtonState was passing NyFormData.stateName (already prefixed with "form_") to NyFormWidget.submit(), which added the prefix again resulting in "form_form_FormName". Now correctly passes NyFormData.name so the state name resolves properly. Bumps version to 7.9.1.
1 parent b632ab8 commit 59e6f06

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [7.9.1] - 2026-03-06
2+
3+
### Fixed
4+
5+
* **Form submit button not calling `onSubmit`** - Fixed `ButtonState` passing `NyFormData.stateName` (already prefixed with `form_`) to `NyFormWidget.submit()`, which added the prefix again resulting in `form_form_FormName`. Now correctly passes `NyFormData.name` so the state name resolves properly
6+
17
## [7.9.0] - 2026-03-05
28

39
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import 'package:nylo_support/widgets/ny_widgets.dart';
4949

5050
```yaml
5151
dependencies:
52-
nylo_support: ^7.9.0
52+
nylo_support: ^7.9.1
5353
```
5454
5555
### Documentation

lib/widgets/src/button_state.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class _ButtonStateState extends NyState<ButtonState> {
8888
);
8989
late String formId;
9090
if (widget.onSubmit!.$2!.$1 is NyFormData) {
91-
formId = (widget.onSubmit!.$2!.$1 as NyFormData).stateName;
91+
formId = (widget.onSubmit!.$2!.$1 as NyFormData).name!;
9292
} else {
9393
formId = widget.onSubmit!.$2!.$1 as String;
9494
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nylo_support
22
description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more.
3-
version: 7.9.0
3+
version: 7.9.1
44
homepage: https://nylo.dev
55
repository: https://github.com/nylo-core/support/tree/7.x
66
issue_tracker: https://github.com/nylo-core/support/issues

0 commit comments

Comments
 (0)