-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[Table] routerLinkActive receives wrong value after data is loaded to the table #6701
Comments
I've tried to make plnkrs as stupid as it is possible. I hope it easy to understand the problem |
I found workaround:
|
Looks like you've uncovered a race condition present in the In the meantime, you can call |
@andrewseguin thank you so much for investigating this stuff. Waiting for fix in angular |
I have the same issue when using the md-accordion.
[expanded] fails on load but works when user clicks the md-expansion-panel.. not really sure how I can use "rla.update()" for my usecase.. any pointers? |
I did it with own method in the component, like:
and used it in the template like so
I guess it is not applicable for your case, so you will have to modify it a bit to pass 'rla' in this method and check it there |
hmm.. but If I pass the rla I end up in the same problem.. right? |
Is it fixed in angular/angular@c569b75 ? |
@Nodarii so this will be fixed in angular 5.. but Material does not yet support angular 5 right? |
@andrewseguin would you (or any one else) help me out on this one.. I would like to use rla.isActive to set expanded true/false on expansion panels but I fail to figure out a way to do so. I would need it to be done once the init of component is completed right? |
@mackelito Not sure off the top of my head here - best to ask on StackOverflow with a stackblitz showing what you want |
I'm facing the same probleme. I'm trying to set my mat-expansion-panel to expanded when rla.isActive is true.
But the panel are all closed on init and I cannot open them. When I click on one of them, there is a wierd animation like if it opens and closes instantally. EDIT: It works when I initialize my catagory list (mainMenu) in a timeout.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
I expect
[routerLinkActive]
to be falsy after table loads data to<md-table>
with[routerLink]
's in it.What is the current behavior?
I put some links inside
<md-table>
;I get link to rla on some of table parents like so
#rla="routerLinkActive"
;rla.isActive
becomestrue
as soon as data appears in the table;What are the steps to reproduce?
Here is working example (without table) http://plnkr.co/edit/P3KazCrx4vTsT4xnrtYM?p=preview
here is non-working example (with table) http://plnkr.co/edit/fEtD8teNak9HOjcziPsB?p=preview
What is the use-case or motivation for changing an existing behavior?
I guess it is clear based on the plunkrs above
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/cli: 1.2.7
node: 8.2.1
os: win32 x64
@angular/animations: 5.0.0-beta.2
@angular/cdk: 2.0.0-beta.8-5e3228f
@angular/common: 5.0.0-beta.2
@angular/compiler: 5.0.0-beta.2
@angular/core: 5.0.0-beta.2
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 5.0.0-beta.2
@angular/http: 5.0.0-beta.2
@angular/material: 2.0.0-beta.8-5e3228f
@angular/platform-browser: 5.0.0-beta.2
@angular/platform-browser-dynamic: 5.0.0-beta.2
@angular/platform-server: 5.0.0-beta.2
@angular/router: 5.0.0-beta.2
@angular/cli: 1.2.7
@angular/compiler-cli: 5.0.0-beta.2
Is there anything else we should know?
While writing plunkr I found that it works only when observable receives value with timeout.
So for example if you comment out tableData.datasource.ts:15,30 in (http://plnkr.co/edit/fEtD8teNak9HOjcziPsB?p=preview) it works just fine
The text was updated successfully, but these errors were encountered: