-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Duplicate text when using ICU expression in list without 'other' #38073
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 |
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.
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.
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
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.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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. |
馃悶 bug report
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.
馃敩 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-cuoymq?file=src%2Fapp%2Fapp.component.html
馃實 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: