I have a simple reaction component, I set the onScroll event for this component, but when I scroll it, I don’t shoot
import React, { Component, PropTypes } from 'react'
export default class MyComponent extends Component {
_handleScroll(e) {
console.log('scrolling')
}
render() {
const style = {
width: '100px',
height: '100px',
overflowY: 'hidden'
}
const innerDiv = {
height: '300px',
width: '100px',
background: '#efefef'
}
return (
<div style={style} onScroll={this._handleScroll}>
<div style={innerDiv}/>
</div>
)
}
}
source
share