Skip to content

Commit 95acddb

Browse files
committed
Fix #714: TypeAhead onReset uses valueTransformer
1 parent 6c25757 commit 95acddb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/src/fields/form_builder_typeahead.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,11 @@ class _FormBuilderTypeAheadState<T>
415415
@override
416416
void reset() {
417417
super.reset();
418-
_typeAheadController.text = initialValue?.toString();
418+
if (widget.valueTransformer != null) {
419+
_typeAheadController.text =
420+
widget.valueTransformer(initialValue)?.toString();
421+
} else {
422+
_typeAheadController.text = initialValue?.toString();
423+
}
419424
}
420425
}

0 commit comments

Comments
 (0)