Skip to content

Commit

Permalink
scrollbar: bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
inter-action authored and sam019 committed Apr 19, 2018
1 parent 469b026 commit 4e0849e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scrollbar/Scrollbar.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import React from 'react';
import ReactDOM from 'react-dom'

import { PropTypes, Component } from '../../libs';
import { addResizeListener, removeResizeListener } from '../../libs/utils/resize-event';
Expand Down Expand Up @@ -30,10 +31,11 @@ export class Scrollbar extends Component {
this.cleanRAF = ()=>{
cancelAnimationFrame(rafId)
}
this.resize = ReactDOM.findDOMNode(this.refs.resize)
if (!this.props.noresize){
addResizeListener(this.refs.resize, handler)
addResizeListener(this.resize, handler)
this.cleanResize = ()=>{
removeResizeListener(this.refs.resize, handler);
removeResizeListener(this.resize, handler);
}
}
}
Expand Down

0 comments on commit 4e0849e

Please sign in to comment.