Cnilton / react-native-floating-label-input

A customizable React Native TextInput with its placeholder always shown. Includes masks, global styles, character count, and a bunch else.
MIT License
280 stars 59 forks source link

cannot toggle label color on focused v1.3.4 #79

Closed vietcuong122 closed 3 years ago

vietcuong122 commented 3 years ago

I have override the onFocus/onBlur props, and handled isFocused as an state variable, but the color of label when focused not changed. Here is my code, hope to get your help. floatinglabelinput

Cnilton commented 3 years ago

Hi @vietcuong122, I'll try to reproduce this issue.

vietcuong122 commented 3 years ago

Can anyone found this issue or the solved for this?

Cnilton commented 3 years ago

@vietcuong122, I'm sorry but using the following code I couldn't reproduce this issue.


<FloatingLabelInput
      label={'label'}
      value={val}
      onChangeText={(newValue)=> setVal(newValue)}
      autoCapitalize={'words'}
      customLabelStyles={{colorBlurred: '#f0f', colorFocused: '#000'}}
      isFocused={focused}
      onFocus={() => { setFocused(true) }}
      onBlur={() => { setFocused(false) }}
      blurOnSubmit={false}
      />
Cnilton commented 3 years ago

@vietcuong122 any updates?

Cnilton commented 3 years ago

Closing this due to no answer