Forcing to `alignSelf: stretch` was removed from <TextInput>
Summary: Because it introduces inconsistency in RN layout model, confuses people and hurts dev experience. The original problem was introduced in D1611014 as an attempt to address the intrinsic size issue. So, now <TextInput> has intrinsic size (D5069971) and we don't need this hack anymore. GH issues: https://github.com/facebook/react-native/issues/11892 https://github.com/facebook/react-native/issues/9646 Reviewed By: javache Differential Revision: D5072833 fbshipit-source-id: d9a60ab09b728e6de89bfa53eda07069377f1369
This commit is contained in:
parent
44af4d19d3
commit
4e40521620
|
@ -628,7 +628,7 @@ const TextInput = React.createClass({
|
|||
var textContainer;
|
||||
|
||||
var props = Object.assign({}, this.props);
|
||||
props.style = [styles.input, this.props.style];
|
||||
props.style = [this.props.style];
|
||||
|
||||
if (props.selection && props.selection.end == null) {
|
||||
props.selection = {start: props.selection.start, end: props.selection.start};
|
||||
|
@ -859,9 +859,6 @@ const TextInput = React.createClass({
|
|||
});
|
||||
|
||||
var styles = StyleSheet.create({
|
||||
input: {
|
||||
alignSelf: 'stretch',
|
||||
},
|
||||
multilineInput: {
|
||||
// This default top inset makes RCTTextView seem as close as possible
|
||||
// to single-line RCTTextField defaults, using the system defaults
|
||||
|
|
Loading…
Reference in New Issue