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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes not getting reflected when used in component with OnPush changeDetectionStrategy #145

Open
shripalsoni04 opened this issue Oct 12, 2016 · 4 comments

Comments

@shripalsoni04
Copy link

shripalsoni04 commented Oct 12, 2016

First of all, thank you so much for creating such useful library. Great work 馃憤 .

I am trying to use mdl-textfield and mdl-checkbox inside child component which has changeDetection set to OnPush strategy.

The problem is, whenever the input is changed for this child component, that changes are not getting reflected in the mdl components. I forked the demo plunker and did changes to show this issue. You can check it at http://plnkr.co/edit/qRYdXrESNBP8EtAC1tug?p=preview

As you can see in the app, when app loads, the mdl components are not setting the initial data and when you click on "Change Data" button, mdl components are loading old data and floating label is not getting placed properly.

Let me know if I am doing something wrong here.

@mseemann
Copy link
Owner

interesting! from my understanding of OnPush this should work. right now i can't see anything the component could do to fix this. changing the changeDetection to ChangeDetectionStrategy.OnPush for mdl-textfield did not fix this (as expected - because mdl-checkbox is using OnPush already). Give me some time to investigate this...

@mseemann mseemann added the WIP label Oct 29, 2016
@mseemann
Copy link
Owner

issue created: angular/angular#12607. Let's see what the angular team is saying about this.

@mseemann
Copy link
Owner

this seems to be the "main issue": angular/angular#10816

@mseemann mseemann added the Bug label Oct 29, 2016
@cerebroo
Copy link

any updates on this?

I really need to use onPush in my projects and blocked because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants