Skip to content

Commit

Permalink
feat: Allow pressing on accessories if input not disabled
Browse files Browse the repository at this point in the history
Closes #25

p.s. untested
  • Loading branch information
FDiskas authored and gabrieldonadel committed Jul 18, 2021
1 parent 05a870e commit 0cc7053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ export default class TextField extends PureComponent {
style: containerStyle,
onStartShouldSetResponder: () => true,
onResponderRelease: this.onPress,
pointerEvents: !disabled && editable ? 'auto' : 'none',
pointerEvents: !disabled ? 'auto' : 'none',
}

let inputContainerProps = {
Expand Down Expand Up @@ -670,7 +670,7 @@ export default class TextField extends PureComponent {
<Animated.View {...inputContainerProps}>
{this.renderLine(lineProps)}
{this.renderAccessory('renderLeftAccessory')}
<View style={styles.stack}>
<View style={styles.stack} pointerEvents={editable ? 'auto' : 'none'}>
{this.renderLabel(styleProps)}
<View style={styles.row}>
{this.renderAffix('prefix')}
Expand Down

0 comments on commit 0cc7053

Please sign in to comment.