-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix DropdownMenu filtering is broken #177450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DropdownMenu filtering is broken #177450
Conversation
There was a problem hiding this 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.
QuncCccccc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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
## 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).
Description
This PR fixes
DropdownMenufiltering.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).