Skip to content

Commit

Permalink
Show the placeholder when forceActiveLabel is true
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Mar 7, 2022
1 parent ab066cb commit 564b55c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,16 @@ class BaseTextInput extends Component {
// eslint-disable-next-line
{...inputProps}
defaultValue={this.state.value}
placeholder={(this.props.prefixCharacter || this.state.isFocused || !this.props.label) ? this.props.placeholder : null}
placeholder={
(
this.props.prefixCharacter
|| this.state.isFocused
|| !hasLabel
|| (hasLabel && this.props.forceActiveLabel)
)
? this.props.placeholder
: null
}
placeholderTextColor={themeColors.placeholderText}
underlineColorAndroid="transparent"
style={[
Expand Down

0 comments on commit 564b55c

Please sign in to comment.