Skip to content

Commit 4a78354

Browse files
Alok SinghAlok Singh
authored andcommitted
fix: pr suggested changes
1 parent e98ba46 commit 4a78354

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/components/src/multi-select/multi-select.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ export class MultiSelectComponent<V> implements AfterContentInit, OnChanges {
238238
const selectedItems: SelectOptionComponent<V>[] | undefined = this.allOptionsList?.filter(item =>
239239
this.isSelectedItem(item)
240240
);
241-
241+
242242
this.selectedItemsCount = selectedItems?.length ?? 0;
243+
244+
// Trigger label is placeholder in case there is element selected on multiselect
243245
this.triggerLabel = this.selectedItemsCount === 0 ? this.placeholder : (selectedItems || [])[0]?.label;
244246
}
245247
}

0 commit comments

Comments
 (0)