【发布时间】:2019-01-11 23:35:48
【问题描述】:
我在我的应用程序中使用@ng-select/ng-select@2.3.6,并且数组中有很长的文本。
所以,完整的文本在下拉列表中不可见,所以我想在每个选项上显示标题/工具提示
我试过了,
let listArray = [{name: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s'}];
<ng-select placeholder="Select" (change)="onChange($event)">
<ng-option *ngFor="let list of listArray"
title="{{list.name}}"> {{list.name}} </ng-option>
</ng-select>
但没有运气
【问题讨论】:
-
嗯,很可能有一个最大长度。将用于测试目的的文本缩短为 1 个单词,并看看这是否至少有效。
-
我也有缩短文本,但问题仍然存在。
标签: angular typescript angular6