ng-lightning / ng-lightning

Native Angular components & directives for Lightning Design System

Home Page:http://ng-lightning.github.io/ng-lightning/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PickList: check mark does not appear when value set in code

alamote opened this issue · comments

When I set default value of PickList, it does not show check mark as if I would manually select a value. Is there a way to solve this problem?

component.html

<ngl-picklist nglFormControl
        filter="label"
        [data]="data"
        [(nglPick)]="selected"
        [(open)]="open"
        [nglPickMultiple]="multiple">
    <span class="slds-truncate">{{getPickLabel()}}</span>
    <ng-template nglPicklistItem let-item>{{item.label}}</ng-template>
</ngl-picklist>

component.ts

selected = {label: 'Tier 1', value: 1};
data = [
    {label: 'All tiers', value: null},
    {label: 'Tier 1', value: 1},
    {label: 'Tier 2', value: 2},
    {label: 'Tier 3', value: 3}
]

image_2019_02_22t14_04_34_296z

There has been a new release v4.0. Check if your issue is still valid and please use the Stackblitz button to reproduce it and helps us track it.