Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ var TextInput = React.createClass({
clearTextOnFocus: PropTypes.bool,
/**
* If true, all text will automatically be selected on focus
* @platform ios
*/
selectTextOnFocus: PropTypes.bool,
/**
Expand Down Expand Up @@ -524,6 +523,7 @@ var TextInput = React.createClass({
underlineColorAndroid={this.props.underlineColorAndroid}
children={children}
editable={this.props.editable}
selectTextOnFocus={this.props.selectTextOnFocus}
/>;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ public void setSelectionColor(ReactEditText view, @Nullable Integer color) {
}
}

@ReactProp(name = "selectTextOnFocus", defaultBoolean = false)
public void setSelectTextOnFocus(ReactEditText view, boolean selectTextOnFocus) {
view.setSelectAllOnFocus(selectTextOnFocus);
}

@ReactProp(name = ViewProps.COLOR, customType = "Color")
public void setColor(ReactEditText view, @Nullable Integer color) {
if (color == null) {
Expand Down