ngx-mat-select-search - 占位符标签,搜索时没有出现 noEntriesFoundLabel
ngx-mat-select-search - placeholderlabel, noEntriesFoundLabel is not appearing while searching
我正在尝试为 ngx-mat-select-search 包更改 placeholderlabel
和 noentriesfoundlabel
。它不起作用。
这是我的 HTML:
<mat-form-field class="search-field-dropdown" appearance="none">
<mat-select
formControlName="country"
class="matdropdownCustom"
placeholder="Country"
placeholderLabel="Find country..."
noEntriesFoundLabel="'no matching country found'"
>
<mat-option>
<ngx-mat-select-search
[formControl]="countryFilterCtrl"
></ngx-mat-select-search>
</mat-option>
<mat-option
*ngFor="let option1 of filteredCountriesList | async"
[value]="option1.name"
>
{{ option1.name }}
</mat-option>
</mat-select>
</mat-form-field>
您必须为ngx-mat-select-search
元素放置placeholderLabel
和noEntriesFoundLabel
,而不是mat-select
元素。
<ngx-mat-select-search
[formControl]="countryFilterCtrl"
placeholderLabel="Find country..."
noEntriesFoundLabel="'no matching country found'"
></ngx-mat-select-search>
参考资料
我正在尝试为 ngx-mat-select-search 包更改 placeholderlabel
和 noentriesfoundlabel
。它不起作用。
这是我的 HTML:
<mat-form-field class="search-field-dropdown" appearance="none">
<mat-select
formControlName="country"
class="matdropdownCustom"
placeholder="Country"
placeholderLabel="Find country..."
noEntriesFoundLabel="'no matching country found'"
>
<mat-option>
<ngx-mat-select-search
[formControl]="countryFilterCtrl"
></ngx-mat-select-search>
</mat-option>
<mat-option
*ngFor="let option1 of filteredCountriesList | async"
[value]="option1.name"
>
{{ option1.name }}
</mat-option>
</mat-select>
</mat-form-field>
您必须为ngx-mat-select-search
元素放置placeholderLabel
和noEntriesFoundLabel
,而不是mat-select
元素。
<ngx-mat-select-search
[formControl]="countryFilterCtrl"
placeholderLabel="Find country..."
noEntriesFoundLabel="'no matching country found'"
></ngx-mat-select-search>