ng2-auto-complete有叠加占位符问题

时间:2017-05-06 05:57:57

标签: html angular angular2-forms angular-material2

我正在使用ng2-auto-complete来获取Angular2(版本2.3.1)和Angular Material(版本2.0.0-beta.1)的可搜索下拉列表。

我面临使用所选值的占位符覆盖问题。 当我从下拉列表中选择任何值而不键入搜索字符串时,所选值将覆盖该输入字段的html占位符。

当我们将字符串搜索到下拉列表然后选择它时,它可以正常工作。

以下是我的代码示例:

<input md-input ng2-auto-complete
           [formControl]="company"
           [source]="clients"
           [list-formatter]="companyFormatter"
           align="end"
           value-property-name="shortname"
           display-property-name="shortname"
           no-match-found-text="No Match Found"
           placeholder="Client Name"
           (valueChanged)="someFunction(company)"
           class="form-control"
           tabindex="1">

其中,

clients = ["{shortname:abc},{shortname:efg},{shortname:hij}"]

任何See Image Here. The view looks like this and thats not good for user.

0 个答案:

没有答案
相关问题