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
Angular 4.x regression with embedded view handling #15352
Comments
expected vs observed behavior ? |
Observed: using 4.0.0-rc.5 when you hover over stars (mouseenter and mouseleve without click) the highlighted rating comes doesn't come back to the initial; Expected: hovering overs stars without clicking should display initial rating on mouseleve. @vicb sorry for not having a smaller reproduce scenario atm, I'm trying to isolate it as we speak. What I'm seeing is that refreshing a property on a context passed to an embedded template doesn't refresh the template bindings. But in ratings there are multiple levels of embedded views involved so I'm trying to come up with a minimal reproduce. In any case there is a scenario that used to work just fine in 2.4.x and fails in 4.x and we are not doing anything too crazy. Let me try to reproduce it in a simpler way |
@pkozlowski-opensource have you tried without OnPush? |
@vicb here is a minimal plunker: http://plnkr.co/edit/eJ8XjQJHeZyFzvLDWV64?p=preview Observed: clicking on a text node doesn't increment numbers Expected: clicking on a text node increment numbers @DzmitryShylovich good path: in fact this is a combination of a host listener + OnPush. |
@pkozlowski-opensource could you try #15359? |
@tbosch I can confirm that your PR #15359 fixes the issue: http://plnkr.co/edit/ZZK6szqSUvc7YnsknXfs?p=preview Many thnx for looking into it and extremely fast turnaround on this one! |
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. |
I'm submitting a ... (check one with "x")
Minimal reproduction of the problem with instructions
This was discovered when switching ng-bootstrap to Angular 4 rc.5. Here is a plunker that works with the latest 2.3.x but fails when switching to Angular 4 rc.5:
http://plnkr.co/edit/Ha2UMEOc3pT2jUpg1Mjf?p=preview
Steps to reproduce:
config.js
and repeat the scenario - see that with 4.0.0-rc.5 rating doesn't come back to the initial version on mouseleaveYou can see the code for the rating directive here: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/rating/rating.ts
I'm working on a reduced reproduction scenario but wanted to open an issue ASAP as an "early warning". Currently my suspicion is that sth goes wrong when creating embedded views (or more precisely - refreshing them when context changes). I will provide a smaller reproduce as soon as I can narrow it down.
4.0.0-rc.5
all
TypeScript
The text was updated successfully, but these errors were encountered: