i have a ngselect dropdown list the reasonds are too long not able to see it

79 views Asked by At
 <div *ngIf="reasons$ | async as reasonList">
                  <ng-select
                    [items]="reasonList"
                    [multiple]="false"
                    formControlName="reason"
                    appendTo="body"
                    class="custom cursor-pointer"
                    placeholder="Reason "
                    bindLabel="name"
                    bindValue="name"
                  >
                  <ng-template ng-option-tmp let-item="item">
                    <div title="{{item.name}}">{{item.name}}</div>
                    </ng-template>
                  </ng-select>
    </div>

This is my dropdown cod ebut when using ng-template i am not able to see the data in the ui

i need the data to be shown and also since the reasons are too long i need that displayed in a tooltip way so that i can see the entire reason

1

There are 1 answers

0
Ada10 On
{{ item }}

i didnot have any object called a name in my data i had a list of ojects in an array so i just called the {{ item }} instead of {{item.name}}