ng-select
ng-select copied to clipboard
Multiple select missing selected option template
There is a problem with multiple select which does not have a possibility to customize template of selected options(value). It is working properly for single select where you can define custom #optionTemplate and rewrite at once template for option(dropdown) and selected option(value).
In this part of code u can see how it is implemented for single select: https://github.com/basvandenberg/ng-select/blob/master/src/select.component.html#L13
<div class="value" *ngIf="optionList.hasSelected">
<ng-template [ngOutletContext]="{option: optionList.selection[0], onDeselectOptionClick: onDeselectOptionClick}" [ngTemplateOutlet]="optionTemplate"></ng-template>
<span *ngIf="!optionTemplate">{{optionList.selection[0].label}}</span>
</div>
.
.
.
In here you can see it is missing for multiple select: https://github.com/basvandenberg/ng-select/blob/master/src/select.component.html#L39
<div class="option" *ngFor="let option of optionList.selection">
<span class="deselect-option" (click)=onDeselectOptionClick(option)>
✕
</span>
{{option.label}}
</div>
Can you please look into this issue?