Skip to content

Commit

Permalink
Revert hidden text placeholder on BaseTextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
reinaldosebastian committed Jun 25, 2023
1 parent 1b36c75 commit 93c513e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ class BaseTextInput extends Component {
{},
);
const isMultiline = this.props.multiline || this.props.autoGrowHeight;
//if AutoGrowWeight is true, placeholder needs to be filled with any string.
const hiddenTextPlaceholder = this.props.placeholder ? this.props.placeholder : this.props.autoGrowHeight ? ' ' : '';

return (
<>
Expand Down Expand Up @@ -390,7 +388,7 @@ class BaseTextInput extends Component {
]}
onLayout={(e) => this.setState({textInputWidth: e.nativeEvent.layout.width + 2, textInputHeight: e.nativeEvent.layout.height})}
>
{this.state.value || hiddenTextPlaceholder}
{this.state.value || this.props.placeholder}
</Text>
)}
</>
Expand Down

0 comments on commit 93c513e

Please sign in to comment.