add scrollTop to ui/components/column (#4563)

lolsob-rspec
Ondřej Hruška 2017-08-09 00:21:58 +02:00 committed by Eugen Rochko
parent 8c3f5acf0e
commit df045a98e1
1 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,17 @@ export default class Column extends React.PureComponent {
this._interruptScrollAnimation = scrollTop(scrollable);
}
scrollTop () {
const scrollable = this.node.querySelector('.scrollable');
if (!scrollable) {
return;
}
this._interruptScrollAnimation = scrollTop(scrollable);
}
handleScroll = debounce(() => {
if (typeof this._interruptScrollAnimation !== 'undefined') {
this._interruptScrollAnimation();