Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "7470 - added onLayout to textinput perent component & used dynamic he…" #10096

Merged
merged 1 commit into from
Jul 26, 2022
Merged
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
4 changes: 0 additions & 4 deletions src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import * as Expensicons from '../Icon/Expensicons';
import Text from '../Text';
import * as styleConst from './styleConst';
import * as StyleUtils from '../../styles/StyleUtils';
import variables from '../../styles/variables';
import getSecureEntryKeyboardType from '../../libs/getSecureEntryKeyboardType';

class BaseTextInput extends Component {
Expand All @@ -31,7 +30,6 @@ class BaseTextInput extends Component {
passwordHidden: props.secureTextEntry,
textInputWidth: 0,
prefixWidth: 0,
height: variables.componentSizeLarge,

// Value should be kept in state for the autoGrow feature to work - https://github.com/Expensify/App/pull/8232#issuecomment-1077282006
value,
Expand Down Expand Up @@ -214,7 +212,6 @@ class BaseTextInput extends Component {
>
<TouchableWithoutFeedback onPress={this.onPress} focusable={false}>
<View
onLayout={event => this.setState({height: event.nativeEvent.layout.height})}
style={[
textInputContainerStyles,

Expand Down Expand Up @@ -267,7 +264,6 @@ class BaseTextInput extends Component {
!hasLabel && styles.pv0,
this.props.prefixCharacter && StyleUtils.getPaddingLeft(this.state.prefixWidth + styles.pl1.paddingLeft),
this.props.secureTextEntry && styles.secureInput,
{height: this.state.height},
]}
multiline={this.props.multiline}
maxLength={this.props.maxLength}
Expand Down
1 change: 1 addition & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ const styles = {
paddingBottom: 8,
paddingHorizontal: 11,
borderWidth: 0,
borderRadius: variables.componentBorderRadiusNormal,
},

textInputMultiline: {
Expand Down