-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[CP-stable] Revert "Fix DropdownMenu does not rematch initialSelection when entries have changed" #161177
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
Merged
auto-submit
merged 1 commit into
flutter:flutter-3.27-candidate.0
from
nate-thegrate:dropdown-cherry-pick
Jan 9, 2025
Merged
[CP-stable] Revert "Fix DropdownMenu does not rematch initialSelection when entries have changed" #161177
auto-submit
merged 1 commit into
flutter:flutter-3.27-candidate.0
from
nate-thegrate:dropdown-cherry-pick
Jan 9, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…es have changed" This reverts commit 21381d8.
bleroux
approved these changes
Jan 7, 2025
Contributor
bleroux
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!
Piinks
approved these changes
Jan 8, 2025
Contributor
Piinks
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
d9d3889
into
flutter:flutter-3.27-candidate.0
121 checks passed
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 14, 2025
…alSelection when entries have changed" (flutter/flutter#161177)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 14, 2025
…alSelection when entries have changed" (flutter/flutter#161177)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2025
…alSelection when entries have changed" (flutter/flutter#161177)
This was referenced Jan 17, 2025
Contributor
|
@pamtbaau Oh good catch for noticing the issue is locked 🙏 . Let me unlock it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
cp: review
Cherry-picks in the review queue
d: api docs
Issues with https://api.flutter.dev/
d: examples
Sample code and demos
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request reverts the changes in #155757.
The auto-formatter created conflicts in the master branch, so the revert was performed manually in #160643.
For this cherry-pick PR, I was able to run
git revert 21381d843f3feb32640ae385aedd8e5c4003696bwithout any problems.Issue Links
bug reports: #160196, #160555
cherry-pick request: #161176
Target
stable
Changelog Description
Passing a list literal to a
DropdownMenucauses the widget to reset to theinitialSelectionafter each build.Impacted Users
This affects anyone using the DropdownMenu widget.
Impact Description
The impact usually consists of the text value being inconveniently reset each time the widget is rebuilt. (In some cases it can be a fatal crash: the code sample from #160196 shows how this change can lead to an infinite build loop.)
Workaround
This regression can be mitigated by caching & modifying a single list instance, rather than using a list literal for the
DropdownMenuconstructor.Risk
low
Test Coverage
yes
Validation Steps
#160643 added a regression test for this revert.
The fix can also be verified by running the code sample from #160196 and verifying that there is no infinite build loop.