Repository navigation
[CP-stable] Revert "Fix DropdownMenu does not rematch initialSelection when entries have changed" - #161177
Merged
auto-submit[bot] merged 1 commit intoJan 9, 2025
Conversation
…es have changed" This reverts commit 21381d8.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 14, 2025
…Selection 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
…Selection 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
…Selection 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. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.