-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fixed collapsed state when restoring view container parts #7893
Conversation
Fixes #7037? |
@@ -403,10 +403,8 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica | |||
const part = parts[index]; | |||
const partState = partStates.find(s => part.partId === s.partId); | |||
if (partState) { | |||
part.setHidden(partState.hidden); |
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.
setHidden
sets collapsed = false
if the part is visible (not hidden).
No, that must be caused by something else. The npm scripts part seems to be restored asynchronously. |
* The view container restores the visibility, order and relative sizes of contained | ||
* widgets, but _not_ the widgets themselves. In case the set of widgets is not fixed, | ||
* it should be restored in the specific subclass or in the widget holding the view container. | ||
*/ |
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.
This comment is outdated. @akosyakov implemented restoring of contained widgets in 9320510
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.
#ok
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.
Verified 👍
What it does
Fixes restoration of view container parts state, specifically the
collapsed
state.How to test
Open a view container (e.g. Debug or Extensions), collapse some parts and reload the page.
Before this change: all visible parts are expanded.
After this change: parts are kept collapsed or expanded as before.
Review checklist
Reminder for reviewers