Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Oct 23, 2025

Description

This PR fixes DropdownMenu filtering.
This is mainly a revert of #162062.
It adds a test to avoid a similar regression in the future.

It will reeopen #155660. A future PR will try to fix that issue.

See #174757 (comment) for more context.

Related Issue

Fixes DropdownMenu filtering is broken
Reeopens DropdownMenu.didUpdateWidget should re-match initialSelection when dropdownMenuEntries have changed

Tests

Adds 1 test.
Removes 3 tests (reverted tests from #162062).

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Oct 23, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly reverts a previous change that introduced a filtering regression in the DropdownMenu. The changes cleanly remove the logic associated with _selectedEntryIndex, which was the source of the bug. The corresponding tests for the reverted functionality are also removed, and a new regression test is added to verify the fix and prevent similar issues in the future. The changes are well-contained and directly address the problem. I see no issues with this approach.

@bleroux bleroux requested a review from QuncCccccc October 23, 2025 19:16
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 25, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Oct 25, 2025
Merged via the queue into flutter:master with commit b05f001 Oct 25, 2025
78 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 26, 2025
@bleroux bleroux deleted the fix_dropdownmenu_filtering_is_broken branch October 27, 2025 07:25
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 27, 2025
flutter/flutter@cb18290...4c91098

2025-10-26 [email protected] Roll ICU from ff35c4f9df23 to f27805b7d7d8 (1 revision) (flutter/flutter#177558)
2025-10-26 [email protected] Roll Skia from b85c7ae19092 to de52b3a7585a (1 revision) (flutter/flutter#177550)
2025-10-25 [email protected] Make sure that a DropdownMenu doesn't crash in 0x0 environment (flutter/flutter#174809)
2025-10-25 [email protected] Fix DropdownMenu filtering is broken (flutter/flutter#177450)
2025-10-25 [email protected] Roll Skia from f352da2d607f to b85c7ae19092 (1 revision) (flutter/flutter#177539)
2025-10-25 [email protected] Roll Skia from e91d238ce638 to f352da2d607f (4 revisions) (flutter/flutter#177525)
2025-10-24 [email protected] Add more docs to TextBaseline (flutter/flutter#177507)
2025-10-24 [email protected] Bump Templates To Correct Versions (flutter/flutter#177416)
2025-10-24 [email protected] [web] Use SkPathBuilder because SkPath is becoming immutable (flutter/flutter#177343)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
## Description

This PR fixes `DropdownMenu` filtering.
This is mainly a revert of
flutter#162062.
It adds a test to avoid a similar regression in the future.

It will reeopen flutter#155660. A
future PR will try to fix that issue.

See
flutter#174757 (comment)
for more context.

## Related Issue

Fixes [DropdownMenu filtering is
broken](flutter#174609)
Reeopens [DropdownMenu.didUpdateWidget should re-match initialSelection
when dropdownMenuEntries have
changed](flutter#155660)

## Tests

Adds 1 test.
Removes 3 tests (reverted tests from
flutter#162062).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DropdownMenu filtering is broken (after selecting an item, it reverts to a different value)

2 participants