Hi Samir,
Greetings from Syncfusion support.
We have checked your query. While working with huge amount of data, we suggest you use Virtual Scrolling technique which loads items on demand. We can achieve this by loading items manually on scrolling. Here we have initially loaded some items using take property in query. And when you scroll the popup dynamically, we have updated the list items by demand. We can use the open event in the multiselect control and bind the scroll event for the popup list event. Kindly refer to the following code snippet
public onOpen(args){
let start: number = 7;
let end: number = 12;
let listElement: HTMLElement = (this.multiselectObj as any).list;
listElement.addEventListener('scroll', () => {
if ((listElement.scrollTop + listElement.offsetHeight >= listElement.scrollHeight)) {
let filterQuery = this.multiselectObj.query.clone();
this.data.executeQuery(filterQuery.range(start, end)).then((event: any) => {
start = end;
end += 5;
this.multiselectObj.addItem(event.result as { [key: string]: Object }[]);
}).catch((e: Object) => {
});
}
})
}
|
Also, to limit the number of requests to send to server, we suggest to refer the below documentation.
Regards,
Sureshkumar P