This is a migrated thread and some comments may be shown as answers.

Infinity scroll

1 Answer 164 Views
ScrollView
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 28 May 2020, 10:26 AM

Hi!

 

Have any ways make infinite scroll for data source? I need make cyclical page scrolling. By default Kendo disable next scroll button when reached last slide.
What i tried. I attach functin on onchange event like this

_infinityScroll: function (e) {
var nextPage = e.nextPage,
currentPage = e.curentPage,
items = e.sender.dataSource.data();

if (currentPage === -1) {
e.curentPage = 0
}

if (nextPage === -1) {
e.nextPage = 0
}

if (nextPage === items.length) {
e.sender.element.data('kendoScrollView').scrollTo(-1);
e.preventDefault();

}

_showScrollButtons()
},

It's works but looks so bad...

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 01 Jun 2020, 08:11 AM

Hi Andrey,

The implementation of the ScrollView component doesn't have a built-in configuration that can achieve the targeted functionality.

What you've shared as a possible implementation is a good solution to the issue. I don't think we can offer another approach that will be different from the current one and will "look better".  

Regards,
Petar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ScrollView
Asked by
Andrey
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or