Skip to content

DropdownMenu.enableFilter does not work #121062

@jpnurmi

Description

@jpnurmi

Use case

DropdownMenu remains editable regardless that searching and filtering are both disabled.

import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
        body: Center(
          child: DropdownMenu(
            enableFilter: false, // <===
            enableSearch: false, // <===
            initialSelection: 0,
            dropdownMenuEntries: [
              for (int i = 0; i < 5; ++i)
                DropdownMenuEntry(
                  value: i,
                  label: 'entry $i',
                ),
            ],
          ),
        ),
      ),
    ),
  );
}

image

Proposal

Make it non-editable when both enableFilter: false and enableSearch: false are set, or add a separate editable property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.found in release: 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8frameworkflutter/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 version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions