Bug
Expansion panel should not close on data changes
Expansion panel is closing after data is updated
http://plnkr.co/edit/KMgrqrb1gsOHK0AofCOf?p=preview
Users shouldn't re-open the expansion panel when data is updating (e.g http request)
Angular 5.0.0
material 5.0.0
typescript 2.4.2
all browsers
This is expected behavior and due to you assigning a new array to packs. I would suggest looking into trackBy.
Closing as this is working as expected.
The expansion panel is not being closed but rather an entirely new expansion panel is being rendered and the old one is destroyed as the object is modified. As @willshowell noted, you can use trackBy to perform the function you are looking for.
Write this following code you may solve this issue
ngOnInit() {
this.href = this.router.url;
console.log(this.href);
}
[expanded]="[this.href === 'routelink']"
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._
Most helpful comment
Closing as this is working as expected.
The expansion panel is not being closed but rather an entirely new expansion panel is being rendered and the old one is destroyed as the object is modified. As @willshowell noted, you can use
trackByto perform the function you are looking for.