schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

the onScroll event doesn't fire though code 'var iScroll = require('iscroll/build/iscroll-probe')' is added #51

Closed jxintang closed 7 years ago

jxintang commented 7 years ago

when I scroll the scroller, the alert doesn't fire,so wired. below is the code

import ReactIScroll from 'react-iscroll';
var iScroll = require('iscroll/build/iscroll-probe');
import React from 'react';
export default class TabelListView extends React.Component {
    onScroll(iScroll) {
        alert('t')
   }
   render(
      <ReactIScroll
                    ref="iScroll"
                    iScroll={iScroll}
                    onScroll={this.onScroll.bind(this)}>
      {...content}
    </ReactIScroll>
  )
}
sinn1 commented 7 years ago

Having same problem. Also using iscroll-probe and event isn't firing.

@jxintang how did you fix this?

On version 2.0.3 with iScroll v5.2.0

supostat commented 6 years ago

You should add probeType:2 in your options