From 5d7547010bf88bcef7d24510b2797bcc42c50772 Mon Sep 17 00:00:00 2001 From: dev-anton-ko Date: Wed, 16 Nov 2022 11:47:32 -0600 Subject: [PATCH] fix(module:select): activated value resetting during load on scroll --- 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 1b987f290b..02e9fdf734 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;