From 06e96a709ec790b7ddcff2053de0342f46c718a5 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 12 Sep 2023 22:05:07 +0200 Subject: [PATCH] Hide Select All if items number is less than 2 --- .../cps-autocomplete/cps-autocomplete.component.html | 5 ++++- .../src/lib/components/cps-select/cps-select.component.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/cps-ui-kit/src/lib/components/cps-autocomplete/cps-autocomplete.component.html b/projects/cps-ui-kit/src/lib/components/cps-autocomplete/cps-autocomplete.component.html index 2ea8e34d..0478f3d6 100644 --- a/projects/cps-ui-kit/src/lib/components/cps-autocomplete/cps-autocomplete.component.html +++ b/projects/cps-ui-kit/src/lib/components/cps-autocomplete/cps-autocomplete.component.html @@ -141,7 +141,10 @@ class="cps-autocomplete-options-option select-all-option" [class.allselected]="value?.length === options.length" *ngIf=" - multiple && selectAll && filteredOptions.length === options.length + multiple && + selectAll && + filteredOptions.length === options.length && + options.length > 1 " (click)="toggleAll()"> diff --git a/projects/cps-ui-kit/src/lib/components/cps-select/cps-select.component.html b/projects/cps-ui-kit/src/lib/components/cps-select/cps-select.component.html index 57e9521b..43b8b86c 100644 --- a/projects/cps-ui-kit/src/lib/components/cps-select/cps-select.component.html +++ b/projects/cps-ui-kit/src/lib/components/cps-select/cps-select.component.html @@ -120,7 +120,7 @@