Duplicate text when using ICU expression in list without 'other' #38073
Milestone
Comments
|
First let me say thank you for creating simple and easy to follow reproduction with text explaining what to click and what is about to happen. KUDOS! Yes, this seems to be a bug. While ICU may require |
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Jul 18, 2020
Fixes an issue where the previous value of an ICU expression wasn't being removed, if it didn't have an `other` parameter and it's the last value inside a template. The issue seems to be due to the fact that we were resetting the index of the active expression if we didn't manage to match a value to it which prevented the previous node from being cleaned up on the next template run. Fixes angular#38073.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Jul 18, 2020
Fixes an issue where the previous value of an ICU expression wasn't being removed, if it didn't have an `other` parameter and it's the last value inside a template. The issue seems to be due to the fact that we were resetting the index of the active expression if we didn't manage to match a value to it which prevented the previous node from being cleaned up on the next template run. Also cleans up an optional parameter in one of the internal functions and adds stronger typing to the i18n unit tests. Fixes angular#38073.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Jul 20, 2020
Fixes an issue where the previous value of an ICU expression wasn't being removed, if it didn't have an `other` parameter and it's the last value inside a template. The issue is due to the `createDynamicNodeAtIndex` function which sets a new node at a particular index inside the `LView`, but it doesn't account for any node that may have existed there beforehand. Since we've overwritten the reference, we don't have a way of removing the node from the DOM anymore. Also cleans up an optional parameter in one of the internal functions and adds stronger typing to the i18n unit tests. Fixes angular#38073. fixup! fix(core): ICU expression previous value not removed inside template fixup! fix(core): ICU expression previous value not removed inside template
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Jul 20, 2020
Fixes an issue where the previous value of an ICU expression wasn't being removed, if it didn't have an `other` parameter and it's the last value inside a template. The issue is due to the `createDynamicNodeAtIndex` function which sets a new node at a particular index inside the `LView`, but it doesn't account for any node that may have existed there beforehand. Since we've overwritten the reference, we don't have a way of removing the node from the DOM anymore. Also cleans up an optional parameter in one of the internal functions and adds stronger typing to the i18n unit tests. Fixes angular#38073.
crisbeto
added a commit
to crisbeto/angular
that referenced
this issue
Aug 9, 2020
Fixes an issue where the previous value of an ICU expression wasn't being removed, if it didn't have an `other` parameter and it's the last value inside a template. The issue is due to the `createDynamicNodeAtIndex` function which sets a new node at a particular index inside the `LView`, but it doesn't account for any node that may have existed there beforehand. Since we've overwritten the reference, we don't have a way of removing the node from the DOM anymore. Also cleans up an optional parameter in one of the internal functions and adds stronger typing to the i18n unit tests. Fixes angular#38073.
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 9, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 12, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 13, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 15, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 16, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 16, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 17, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 20, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 20, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 20, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 20, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 21, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 21, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 21, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 21, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Oct 21, 2020
Before this refactoring/fix the ICU would store the current selected index in `TView`. This is incorrect, since if ICU is in `ngFor` it will cause issues in some circumstances. This refactoring properly moves the state to `LView`. closes angular#37021 closes angular#38144 closes angular#38073
|
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.


Affected Package
The issue is caused by package @angular/....Is this a regression?
Pretty sure this wasn't an issue in Angular 7. Noticed the issue after updating to Angular 9.
Description
When using an ICU select expression inside a list, if you do not include the "other" placeholder, then subsequent changes to an item in the list causes the replacement text to display twice.
Issue #34018 suggests that the "other" case should actually be required but this is now no longer enforced. It might be worth reinstating the warning if this is deemed not to be a bug.
https://stackblitz.com/edit/angular-ivy-cuoymq?file=src%2Fapp%2Fapp.component.html
Angular Version:
The text was updated successfully, but these errors were encountered: