cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.87k stars 3.81k forks source link

iscroll-infinite: Uncaught TypeError: Cannot read property 'call' of undefined #992

Closed xueqingxiao closed 7 years ago

xueqingxiao commented 8 years ago
this.options.dataset.call(this, 0, this.options.cacheSize); // here dataset is undefined

below is my config:

new IScroll('.m-scroll-wrapper', {
          mouseWheel: true,
          infiniteElements: '.m-scroller p',
          cacheSize: 1000
        });
xueqingxiao commented 8 years ago

iscroll 5 infinite version

tafelito commented 8 years ago

idk if you solved your issue, in case u didn't, u have to set the dataset when setting up the iscroll instance

new IScroll('#wrapper', {
              mouseWheel: true,
              infiniteElements: '#scroller .row',
              // infiniteLimit: 100,
              dataset: requestData,
              dataFiller: updateContent,
              cacheSize: 100
            });