我正在使用Angular 5中的ng-select进行下拉。选择一个选项后,闪烁的光标应消失或它的位置应在文本的末尾。但是从下拉菜单中选择任何选项后,闪烁的光标将移至文本的开始位置。我该如何解决这个问题?
答案 0 :(得分:2)
I mean it's not an issue but it's a feature of ng-select,
as it by default lets you to search or enables you the autocomplete functionality,
to stop this or to hide the autocomplete functionality you need to pass one extra attribute called
[searchable]="false"
this will disable the cursor and autocomplete functionality will also not work hope this helps you
here is the plunkr also here is the full documentation for the same
答案 1 :(得分:0)
在CSS中使用以下代码
return data.map((item: IChartData, index: number, array:IChartData[] ) => {
if (index === 0 || index === array.length - 1) {
return {...item , color:'#137cbd'}
}
// ...