使用jQuery autocomplete,我可以设置一些属性,仅当用户键入特定数量的字符时才开始填充列表。这有助于减少列表中的项目数 ServerFiltering 已启用。
ServerFiltering
https://docs.telerik.com/aspnet-mvc/helpers/autocomplete/overview
.Filter("startswith") .MinLength(3)
filterchange 事件 https://www.telerik.com/kendo-angular-ui/components/dropdowns/autocomplete/filtering/
filterchange
这假设列表已经被填充并且数据绑定已经发生,因此可以过滤列表。
如何仅在输入了最少字符数时绑定列表,就像jQuery小部件使用 ServerBinding ?
ServerBinding
您可以将自动完成初始数据绑定到空数组或预设初始数据项的集合,并且只有在用户键入一定数量的字符后,才能调用数据服务从服务器获取数据,例如:
DOCS
Modified example