diff --git a/src/ScrollBar.tsx b/src/ScrollBar.tsx index c9218d2c..b9b9986b 100644 --- a/src/ScrollBar.tsx +++ b/src/ScrollBar.tsx @@ -173,18 +173,7 @@ export default class ScrollBar extends React.Component { - const { visible } = this.state; - const { height, scrollHeight } = this.props; - - if (height >= scrollHeight) { - return false; - } - - return visible; - }; - + // Not show scrollbar when height is large than scrollHeight showScroll = (): boolean => { const { height, scrollHeight } = this.props; return scrollHeight > height;