Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/material_ui/lib/src/text_form_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class TextFormField extends FormField<String> {
InputCounterWidgetBuilder? buildCounter,
ScrollPhysics? scrollPhysics,
Iterable<String>? autofillHints,
AutovalidateMode? autovalidateMode,
super.autovalidateMode,
ScrollController? scrollController,
super.restorationId,
bool enableIMEPersonalizedLearning = true,
Expand Down Expand Up @@ -228,7 +228,6 @@ class TextFormField extends FormField<String> {
super(
initialValue: controller != null ? controller.text : (initialValue ?? ''),
enabled: enabled ?? decoration?.enabled ?? true,
autovalidateMode: autovalidateMode ?? AutovalidateMode.disabled,
builder: (FormFieldState<String> field) {
final state = field as _TextFormFieldState;
InputDecoration effectiveDecoration = (decoration ?? const InputDecoration())
Expand Down
1 change: 1 addition & 0 deletions packages/material_ui/lib/src/time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2273,6 +2273,7 @@ class _HourMinuteTextFieldState extends State<_HourMinuteTextField> with Restora
controller: controller.value,
decoration: inputDecoration,
validator: widget.validator,
autovalidateMode: AutovalidateMode.disabled,
onEditingComplete: () => widget.onSavedSubmitted(controller.value.text),
onSaved: widget.onSavedSubmitted,
onFieldSubmitted: widget.onSavedSubmitted,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog: |
- Fixes TextFormField overriding the default autovalidateMode, preventing an ancestor Form's autovalidateMode from taking priority.
version: patch