Skip to content
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(expansion-panel): toggle not being updated when set programmatically #5650

Merged
merged 2 commits into from Jul 28, 2017

Conversation

crisbeto
Copy link
Member

Fixes the toggle arrow not being flipped when the expanded is set programmatically, in addition to the hideToggle input not working either. This is a regression from #5549 and is a consequence of the fact that the panel header reaches into the panel to determine what to do with the arrow.

Fixes #5623.

Note: Similarly to #5631, if we want something more practical, we'll have to re-think where the input for these properties should go.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 10, 2017
@crisbeto crisbeto force-pushed the 5623/expansion-panel-on-push branch from abd3779 to d58124c Compare July 25, 2017 13:34
panel.closed,
filter.call(panel._inputChanges, changes => !!changes.hideToggle)
)
.subscribe(() => this._changeDetectorRef.markForCheck());
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to add a unit test for this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can give it a try, but I feel like the manual change detection might cause it not to fail as expected.

@crisbeto crisbeto force-pushed the 5623/expansion-panel-on-push branch from d58124c to 9687d06 Compare July 26, 2017 13:46
@crisbeto
Copy link
Member Author

Added those unit tests as discussed @jelbourn.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jul 26, 2017
Fixes the toggle arrow not being flipped when the `expanded` is set programmatically, in addition to the `hideToggle` input not working either. This is a regression from angular#5549 and is a consequence of the fact that the panel header reaches into the panel to determine what to do with the arrow.

Fixes angular#5623.
@crisbeto crisbeto force-pushed the 5623/expansion-panel-on-push branch from 9687d06 to d09d215 Compare July 27, 2017 17:06
@andrewseguin andrewseguin merged commit 41c804b into angular:master Jul 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(expansion): toggle icon not being updated
4 participants