schovi / react-iscroll

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

iScroll events onScroll not work #39

Closed gmonking closed 7 years ago

gmonking commented 7 years ago
  <ReactIScroll iScroll={iScroll} options={{mouseWheel: true}} onScroll={function(){console.log(1)}} >
    <div>
      ...
    </div>
  </ReactIScroll>

the onScroll callback function not work,

schovi commented 7 years ago

Hi, do you have iscroll probe version? It is only one with onacroll support

Inoir commented 7 years ago

you need to define the probe type you want to use in the options. Had same issue and only that worked for me.

so in your example:

` <ReactIScroll iScroll={iScroll} options={{mouseWheel: true, probeType: 1}} onScroll={function(){console.log(1)}} >

...

`

@schovi would be nice if there is an possibilty to tell iscroll to use at least type 1 if there is the probe version passed in react component?!

Joudee commented 7 years ago

@Inoir It didn't work!

schovi commented 7 years ago

@Inoir updated README with this info https://github.com/schovi/react-iscroll/blob/master/README.md#faqs

Will think if I can do the checking.