Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkTankShark committed Aug 10, 2017
1 parent 331500f commit 1e2dbfd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class Select extends React.Component {
}

componentDidMount() {
if (this.props.scrollParentClass) {
if (typeof this.props.scrollParentClass === 'string') {
this.registerScrollParent(this.props.scrollParentClass);
window.addEventListener('resize', this.handleClose);
}
Expand Down Expand Up @@ -325,7 +325,7 @@ Select.defaultProps = {
disabled: false,
value: '',
options: [],
scrollParentClass: false,
scrollParentClass: '',
onChange: void 0
};

Expand All @@ -339,10 +339,7 @@ Select.propTypes = {
icon: PropTypes.element,
label: PropTypes.string,
disabled: PropTypes.bool,
scrollParentClass: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string
]),
scrollParentClass: PropTypes.string,
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object
Expand Down

0 comments on commit 1e2dbfd

Please sign in to comment.