Infinite Scrolling With Sorting & Filtering

1 Answer 1680 Views
Grid
Janki
Top achievements
Rank 4
Bronze
Iron
Iron
Janki asked on 24 Mar 2022, 02:24 PM

Hey there,

I've been having a tough time getting infinite scrolling to work with sorting and filtering. Because the infinite scrolling splices out of the array of data, I've set up an "original data" state to hold all of the unmutated data. However, this is not working well because the scroll location when you unfilter the data is causing more items to be loaded. I'm sure I'm dealing with a bug on my end, but is there any example of infinite scrolling with sorting and filtering? With a simplified example, I might be able to see what I'm doing wrong on my end.

 

Thank you!
Janki

1 Answer, 1 is accepted

Sort by
-1
Filip
Telerik team
answered on 25 Mar 2022, 01:25 PM

Hi, Janki,

Here is a runnable example that showcases how virtual scrolling can be implemented with sorting and filtering:

https://stackblitz.com/edit/react-r5nvbb-reunzf?file=app/main.jsx

 

As there is a difference between virtual scroll and infinite scroll, please let me know if the requirement is different:

https://www.telerik.com/kendo-react-ui/components/grid/scroll-modes/virtual/

https://www.telerik.com/kendo-react-ui/components/grid/scroll-modes/#toc-infinite-scrolling

I hope this helps.

Regards, FilipProgress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Janki
Top achievements
Rank 4
Bronze
Iron
Iron
Answers by
Filip
Telerik team
Share this question
or