Skip to content

Commit

Permalink
fix editable
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Sep 2, 2016
1 parent fbc7b27 commit 4e57ae5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Expand Up @@ -121,8 +121,8 @@ const InputNumber = React.createClass({
return (
<View style={[styles.container, style]}>
<TouchableWithoutFeedback
onPressIn={(!downDisabledStyle && editable) ? this.onPressInDown : undefined}
onPressOut={(!downDisabledStyle && editable) ? this.onPressOutDown : undefined}
onPressIn={(editable && !downDisabledStyle) ? this.onPressInDown : undefined}
onPressOut={(editable && !downDisabledStyle) ? this.onPressOutDown : undefined}
>
<View
ref={component => this._stepDown = component}
Expand All @@ -146,8 +146,8 @@ const InputNumber = React.createClass({
underlineColorAndroid="transparent"
/>
<TouchableWithoutFeedback
onPressIn={(!upDisabledStyle && editable) ? this.onPressInUp : undefined}
onPressOut={(!upDisabledStyle && editable) ? this.onPressOutUp : undefined}
onPressIn={(editable && !upDisabledStyle) ? this.onPressInUp : undefined}
onPressOut={(editable && !upDisabledStyle) ? this.onPressOutUp : undefined}
>
<View
ref={component => this._stepUp = component}
Expand Down
8 changes: 4 additions & 4 deletions src/index.web.js
Expand Up @@ -114,9 +114,9 @@ const InputNumber = React.createClass({
<a
unselectable="unselectable"
ref="up"
onTouchStart={(editable && upDisabledClass) ? this.up : noop}
onTouchStart={(editable && !upDisabledClass) ? this.up : noop}
onTouchEnd={this.stop}
onMouseDown={(editable && upDisabledClass) ? this.up : noop}
onMouseDown={(editable && !upDisabledClass) ? this.up : noop}
onMouseUp={this.stop}
onMouseLeave={this.stop}
className={`${prefixCls}-handler ${prefixCls}-handler-up ${upDisabledClass}`}
Expand All @@ -130,9 +130,9 @@ const InputNumber = React.createClass({
<a
unselectable="unselectable"
ref="down"
onTouchStart={(editable && downDisabledClass) ? this.down : noop}
onTouchStart={(editable && !downDisabledClass) ? this.down : noop}
onTouchEnd={this.stop}
onMouseDown={(editable && downDisabledClass) ? this.down : noop}
onMouseDown={(editable && !downDisabledClass) ? this.down : noop}
onMouseUp={this.stop}
onMouseLeave={this.stop}
className={`${prefixCls}-handler ${prefixCls}-handler-down ${downDisabledClass}`}
Expand Down

0 comments on commit 4e57ae5

Please sign in to comment.