0
這是我的劍道降下來角2:不能降設置默認值下降
<kendo-dropdownlist
[defaultItem]="defaultItem"
[data] = "getYears"
[textField]="'YearText'"
[valueField]="'YearValue'"
[(ngModel)] = "selectedYear"
>
</kendo-dropdownlist>
clearFilters()是我的方法,當我點擊UI明確其得到執行。
private selectedYear : Year = { YearText: "Select...", YearValue: null };
clearFilters(): void {
this.selectedYear = { YearText: "Select...", YearValue: null };
}
但是當我點擊清除,它不會設置自己選擇?我究竟做錯了什麼?