From f0230743d2958bb2e560b0887db540015eec7d06 Mon Sep 17 00:00:00 2001 From: "thong.pham" Date: Fri, 7 Jun 2024 17:40:58 +0700 Subject: [PATCH 1/2] Multiselect: selectionLimit not working if the value 0 is provided --- src/app/components/multiselect/multiselect.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index c1e55e47633..32cb0668af4 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -264,7 +264,7 @@ export class MultiSelectItem {
Date: Sun, 9 Jun 2024 11:39:53 +0700 Subject: [PATCH 2/2] fix/add more conditions when writeValue --- src/app/components/multiselect/multiselect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index 32cb0668af4..35e153f3cfa 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -1997,7 +1997,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft writeValue(value: any): void { this.value = value; - if (!ObjectUtils.isEmpty(this.selectionLimit)) { + if (!ObjectUtils.isEmpty(this.selectionLimit) && ObjectUtils.isEmpty(this.value)) { this.modelValue.set([]); } else { this.modelValue.set(this.value);