Skip to content

Commit

Permalink
Merge pull request #7 from yueshuaijie/textinput_props
Browse files Browse the repository at this point in the history
Add prop: textInputProps as a dict which will be props of text input.
  • Loading branch information
jaysoo authored Oct 13, 2016
2 parents 6a50795 + e9520bd commit 2d984a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class Prompt extends Component {
cancelButtonStyle: PropTypes.object,
cancelButtonTextStyle: PropTypes.object,
inputStyle: PropTypes.object,
textInputProps: PropTypes.object,
};

static defaultProps = {
Expand Down Expand Up @@ -116,7 +117,8 @@ export default class Prompt extends Component {
onChangeText={this._onChangeText}
placeholder={placeholder}
autoFocus={true}
underlineColorAndroid="white"/>
underlineColorAndroid="white"
{...this.props.textInputProps} />
</View>
<View style={[styles.dialogFooter, { borderColor }]}>
<TouchableWithoutFeedback onPress={this._onCancelPress}>
Expand Down

2 comments on commit 2d984a3

@joevo2
Copy link

@joevo2 joevo2 commented on 2d984a3 Nov 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi there im sorry how do i use this? any example? as i want to use secureTextEntry

@joevo2
Copy link

@joevo2 joevo2 commented on 2d984a3 Nov 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

figured it out :) should add an example textInputProps={{secureTextEntry:true}}

Please sign in to comment.