-
Notifications
You must be signed in to change notification settings - Fork 24.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
[ivy] 'ngClass' + 'dynamic [class] = undefined | null' completely clears out 'static class binding' #35335
Labels
Milestone
Comments
Gretam11
changed the title
[ivy] 'ngClass' + 'dynamic [class]' completely clears out 'static class binding'
[ivy] 'ngClass' + 'dynamic [class] = undefined | null' completely clears out 'static class binding'
Feb 11, 2020
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Feb 12, 2020
…` when shadowed Fix angular#35335
14 tasks
Thank you, it was a showstopper for us to release PrimeNG 9.0.0 |
tundisto
pushed a commit
to TimUnderhay/xsoar-incident-creator
that referenced
this issue
Feb 13, 2020
PrimenNG messages display is broken due to ivy bug angular/angular#35335.
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Feb 14, 2020
…` when shadowed Given: ``` <div class="s1" [class]="null" [ngClass]="exp"> ``` Notice that `[class]` binding is not a `string`. As a result the existing logic would not concatenate `[class]` with `class="s1"`. The resulting falsy value would than be sent to `ngClass` which would promptly clear all styles on the `<div>` The new logic correctly handles falsy values for `[class]` bindings. Fix angular#35335
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Feb 14, 2020
…` when shadowed Given: ``` <div class="s1" [class]="null" [ngClass]="exp"> ``` Notice that `[class]` binding is not a `string`. As a result the existing logic would not concatenate `[class]` with `class="s1"`. The resulting falsy value would than be sent to `ngClass` which would promptly clear all styles on the `<div>` The new logic correctly handles falsy values for `[class]` bindings. Fix angular#35335
alxhub
pushed a commit
that referenced
this issue
Feb 14, 2020
…` when shadowed (#35350) Given: ``` <div class="s1" [class]="null" [ngClass]="exp"> ``` Notice that `[class]` binding is not a `string`. As a result the existing logic would not concatenate `[class]` with `class="s1"`. The resulting falsy value would than be sent to `ngClass` which would promptly clear all styles on the `<div>` The new logic correctly handles falsy values for `[class]` bindings. Fix #35335 PR Close #35350
sonukapoor
pushed a commit
to sonukapoor/angular
that referenced
this issue
Feb 17, 2020
…` when shadowed (angular#35350) Given: ``` <div class="s1" [class]="null" [ngClass]="exp"> ``` Notice that `[class]` binding is not a `string`. As a result the existing logic would not concatenate `[class]` with `class="s1"`. The resulting falsy value would than be sent to `ngClass` which would promptly clear all styles on the `<div>` The new logic correctly handles falsy values for `[class]` bindings. Fix angular#35335 PR Close angular#35350
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
🐞 bug report
Affected Package
The issue is caused by package @angular/core or @angular/common 9.0.0
Is this a regression?
It works fine when Ivy is opted-out.
Description
I'm not sure whether this is a real bug, but it's indeed behavior which some libraries depend on. If the
static class binding
is specified withNgClass
directive and withdynamic class binding equals null or undefined
, all values from static class binding are being cleared out.In case if any string (even empty) is specified in dynamic binding, it just merges all classes as expected.
🔬 Minimal Reproduction
I couldn't turn on ivy on stack-blitz, so here is the link on
ng-run
of minimal reproduction:https://ng-run.com/edit/LKHMmMPIRiZmgFFqMt15
It's handy to turn on/off Ivy there.
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: