我已使用以下软件包在angular4中的表单中使用了多选下拉控件:https://github.com/softsimon/angular-2-dropdown-multiselect
我的下拉菜单中有超过10,000个值,我想实现无限滚动。 有人有任何想法吗?
我尝试使用 searchMaxLimit 和 searchMaxRenderedItems 属性,即在onLazyLoad事件出现但不起作用时增加它们的值< / p>
HTML
<ss-multiselect-dropdown name="multiselect" [(ngModel)]="myModel" [texts]="myTexts"
[settings]="mySettings" [options]="myOptions" (onLazyLoad)="OnLazy($event)">
</ss-multiselect-dropdown>
组件
mySettings= {
enableSearch: true,
checkedStyle: 'fontawesome',
buttonClasses: 'btn btn-default btn-secondary',
selectionLimit: 1,
closeOnSelect: true,
autoUnselect: true,
searchMaxLimit: 100,
searchMaxRenderedItems: 100,
showCheckAll: true,
showUncheckAll: true,
isLazyLoad: true
};
OnLazy(event) {
this.mySettings.searchMaxLimit += 20;
this.mySettings.searchMaxRenderedItems += 20;
console.log(this.mySettings.searchMaxLimit);
console.log(this.mySettings.searchMaxRenderedItems);
}
谢谢