-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(multiple): move expanded state to each expansion item #32314
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
Conversation
1f63c5c to
706d912
Compare
50b1eef to
a8951f5
Compare
|
Deployed dev-app for b0d751a to: https://ng-dev-previews-comp--pr-angular-components-32314-dev-n3u39pya.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
|
|
||
| afterRenderEffect(() => { | ||
| const tab = this._pattern.selectedTab(); | ||
| if (tab) { | ||
| this.selectedTab.set(tab.value()); | ||
| } | ||
| }); | ||
|
|
||
| afterRenderEffect(() => { | ||
| const value = this.selectedTab(); | ||
| if (value) { | ||
| this._pattern.open(value); | ||
| } | ||
| }); |
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.
Make the individual tabs the source of truth for this. We can still expose a readonly selectedTab at the top level
wagnermaciel
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 with one comment
7afdf62 to
1851f17
Compare
637a902 to
b0d751a
Compare
* refactor(multiple): move expanded state to each expansion item * refactor: remove tree declaration merging * refactor: fix tests (cherry picked from commit 3b39d89)
selectedTabinput to change expanded tab/tab panel since it's always single expanded.[(expandedPanels)]) to each Accordion Trigger ([(expanded)]).