From 5b94fa8ff47e74bff4b589d6a832a138444d2084 Mon Sep 17 00:00:00 2001 From: Michael Aziz Date: Tue, 15 Apr 2025 11:28:22 +0200 Subject: [PATCH] [SYNC] --- lib/src/form/src/form_field.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/form/src/form_field.dart b/lib/src/form/src/form_field.dart index 8afe26c..5a2921f 100644 --- a/lib/src/form/src/form_field.dart +++ b/lib/src/form/src/form_field.dart @@ -250,7 +250,14 @@ class _AstromicFormFieldState extends State> { stateKey: widget.formController.fieldStateKey(widget.formID), controller: _controller, initialValue: widget.initialValue, - onTap: widget.onTap, + onTap: widget.onTap != null + ? ((T, String)? currentValue) { + if (widget.resetMessageOnChange ?? false) { + widget.formController.resetState(widget.formID); + } + return widget.onTap!(currentValue); + } + : null, onHold: widget.onHold, onValueChangedMapper: widget.onValueChangedMapper!, //