Skip to content

[DropdownMenu]: With enableFilter and initialSelection set as true, only the pre-selected option is available. #152055

@diegonc

Description

@diegonc

Steps to reproduce

  1. Go to https://dartpad.dev/?id=bee0b0318d47e9c1f8d249fa30d15aa7
  2. Click Run
  3. Wait for the page to display the testcase
  4. Click the DropdownMenu component to display the Menu
  5. When the enableFilter is true and there's an initialSelection, only the pre-selected option is available until an option is clicked or text entered in the input field

Expected results

This is tricky. Given the Actual results I'm not sure what to expect.
What I do know is that having some options displayed when dropping down the menu is useful, even if the typeahead functionality is enabled.

Actual results

Since there's an initial selection and filtering is enabled, it's kinda understandable that only the initial option is displayed.
But it becames weird when, after deleting and entering new text, the other options become visible.

Code sample

Code sample https://dartpad.dev/?id=bee0b0318d47e9c1f8d249fa30d15aa7

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
PS D:\diego\1_Documentos\2_Trabajo\0_Nexitel\pharmacy\app> flutter doctor -v
[✓] Flutter (Channel stable, 3.22.3, on Microsoft Windows [Versi¢n 10.0.22631.3880], locale es-AR)
    • Flutter version 3.22.3 on channel stable at D:\diego\PROGRAMACION\Tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (3 days ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at D:\diego\PROGRAMACION\SDKs\Android
    • Platform android-34, build-tools 33.0.1
    • Java binary at: D:\diego\PROGRAMACION\Tools\android-studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34728.123
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2023.2)
    • Android Studio at D:\diego\PROGRAMACION\Tools\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)

[✓] VS Code (version 1.90.2)
    • VS Code at C:\Users\diego\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versi¢n 10.0.22631.3880]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 126.0.6478.128
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 126.0.2592.61

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-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