Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jun 16, 2021
1 parent 108873e commit b053117
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/ScrollBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,7 @@ export default class ScrollBar extends React.Component<ScrollBarProps, ScrollBar
return ptg * enableHeightRange;
};

// Not show scrollbar when height is large thane scrollHeight
getVisible = (): boolean => {
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;
Expand Down

0 comments on commit b053117

Please sign in to comment.