You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.8, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.89.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
I have form with many FormBuilderTextFields, and some of them are required - (they have validator that checks if its value empty or not), when i am trying to submit the form, calling validation - _formKey.currentState?.validate(), the latest invalid FormField is being focused instead of first one. In my case the latest is FormBuilderDateTimePicker, so when i pres "Submit", the date picker is being opened.
Expected Behavior
After validation, the first invalid Field in the tree should be focused.
Steps To Reproduce
Aditional information
I suppose this is not desired behaviour, but if from some unknown reason that i haven't found this is wanted. Is there at least some way to prevent date picker from opening its picker / dialog ?
I also think that this issue is related to this - #1253, where the focused were jumped to the latest input despite there were also another invalid input above No response
The text was updated successfully, but these errors were encountered:
The solution at #1253 is still valid. I tried several things like unfocusing via a delayed future, nothing works except for that solution. uncomment or remove autovalidateMode: AutovalidateMode.always, at the field and random focussing on fields is gone.
Is there an existing issue for this?
Package/Plugin version
9.2.1
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample
Current Behavior
I have form with many FormBuilderTextFields, and some of them are required - (they have validator that checks if its value empty or not), when i am trying to submit the form, calling validation -
_formKey.currentState?.validate()
, the latest invalid FormField is being focused instead of first one. In my case the latest is FormBuilderDateTimePicker, so when i pres "Submit", the date picker is being opened.Expected Behavior
After validation, the first invalid Field in the tree should be focused.
Steps To Reproduce
Aditional information
I suppose this is not desired behaviour, but if from some unknown reason that i haven't found this is wanted. Is there at least some way to prevent date picker from opening its picker / dialog ?
I also think that this issue is related to this - #1253, where the focused were jumped to the latest input despite there were also another invalid input above
No response
The text was updated successfully, but these errors were encountered: