Repository navigation
DropdownMenu does not clear or update selection when user types text #176753
Copy link
Copy link
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: qualityA truly polished experienceA truly polished experiencea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Use case
Currently, the DropdownMenu widget allows the user to:
- Select an option from the dropdown list (triggering
onSelected). - Type arbitrary text into the input field to perform searching or filtering.
- Tap out of focus and leave the arbitrary text visible without selecting anything or triggering any callbacks.
This is confusing as the text field is the primary feedback for which item has been selected yet it no longer reflects that. See example.
Proposal
I believe the most comprehensive solution would be:
DropdownMenu(
autoSelect: true, // Automatically select highlighted menu item if focus lost
incompleteTextBehavior: // If no highlighted menu item, or autoSelect: false
DropdownIncompleteTextBehavior.ignore, // Leave text as-is, don't emit (current behavior)
or DropdownIncompleteTextBehavior.emit, // Leave text as-is, emit `onSelected(null)`
or DropdownIncompleteTextBehavior.clear, // Clear text, emit `onSelected(null)`
or DropdownIncompleteTextBehavior.reset, // Reset to previous, emit `onSelected(previous)`
)DropdownIncompleteTextBehavior.ignore could then be deprecated with a view to removing in future, forcing the user to do something more sensible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: qualityA truly polished experienceA truly polished experiencea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Activity
tirth-patel-nc commentedon Oct 9, 2025
@nebkat thanks for the report. labeling this as a new proposal. here’s a video demonstrating the issue:
Screen.Recording.2025-10-09.at.3.55.15.PM.mov
#175090 seems related. it’s not a duplicate, but the issues are closely connected.
nebkat commentedon Oct 9, 2025
Adding this also to show what is happening with
onSelected:Screen.Recording.2025-10-09.at.11.35.46.mov
Somewhat related there is no easy way to set the value of the
DropdownMenu<T>to aTwithout manually getting the desired label and applying it to theTextEditingController.In its current form the widget feels like a
TextField/DropdownButtonfrankenstein, excelling at neither function. There is a dedicatedAutocompletewidget for when the text is the primary focus so I feel theDropdownMenushould exclusively be for making selections from the predefined entries.dkwingsmt commentedon Oct 15, 2025
I think having a customizability is a good move, although I don't think we should ever deprecate
ignore. It's like the search bar of Github or Google where you can totally type words without submitting and, while it might seems "confusing", it's an easy behavior to understand.