Skip to content

DropdownMenu does not clear or update selection when user types text #176753

Open

Description

@nebkat

Use case

Currently, the DropdownMenu widget allows the user to:

  1. Select an option from the dropdown list (triggering onSelected).
  2. Type arbitrary text into the input field to perform searching or filtering.
  3. 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.

Activity

  1. tirth-patel-nc commented on Oct 9, 2025

    @tirth-patel-nc
    Member

    @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.

  2. added
    team-designOwned by Design Languages team
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    a: qualityA truly polished experience
    and removed
    in triagePresently being triaged by the triage team
    on Oct 9, 2025
  3. nebkat commented on Oct 9, 2025

    @nebkat
    ContributorAuthor

    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 a T without manually getting the desired label and applying it to the TextEditingController.

    In its current form the widget feels like a TextField/DropdownButton frankenstein, excelling at neither function. There is a dedicated Autocomplete widget for when the text is the primary focus so I feel the DropdownMenu should exclusively be for making selections from the predefined entries.

  4. dkwingsmt commented on Oct 15, 2025

    @dkwingsmt
    Contributor

    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.

  5. added
    P3Issues that are less important to the Flutter project
    triaged-designTriaged by Design Languages team
    on Oct 15, 2025
  6. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: qualityA truly polished experiencea: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions