I\'m trying to add an onScroll event on a table. This is what I\'ve tried:
componentDidMount() {
ReactDOM.findDOMNode(this.refs.table).addEv
I was looking to do something similar. Adding the event listener to the window instead of the ReactDom.findDOMNode worked for me...
componentDidMount() {
window.addEventListener('scroll', this.handleScrollToElement);
}
componentWillUnmount() {
window.removeEventListener('scroll', this.handleScrollToElement);
}
handleScrollToElement(event) {
console.log('Fired ' + event)
}