From 9e08be9e2c0eb15e76da44df7e17d153b3b1339d Mon Sep 17 00:00:00 2001 From: dev-anton-ko <100807957+dev-anton-ko@users.noreply.github.com> Date: Sun, 27 Nov 2022 06:44:21 -0600 Subject: [PATCH] fix(module:select): activated value resetting during load on scroll (#7725) --- components/select/select.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/components/select/select.component.ts b/components/select/select.component.ts index e540792924..6a298ffa74 100644 --- a/components/select/select.component.ts +++ b/components/select/select.component.ts @@ -355,6 +355,7 @@ export class NzSelectComponent implements ControlValueAccessor, OnInit, AfterCon } const activatedItem = listOfContainerItem.find(item => item.nzLabel === this.searchValue) || + listOfContainerItem.find(item => this.compareWith(item.nzValue, this.activatedValue)) || listOfContainerItem.find(item => this.compareWith(item.nzValue, this.listOfValue[0])) || listOfContainerItem[0]; this.activatedValue = (activatedItem && activatedItem.nzValue) || null;