xinthink / react-native-material-kit

Bringing Material Design to React Native
https://rnmk.xinthink.com
MIT License
4.84k stars 578 forks source link

withPassword seems useless? #197

Open zsxsoft opened 8 years ago

zsxsoft commented 8 years ago
react-native@0.29.0
react@15.2.1
react-native-material-kit@0.3.2
Microsoft Windows [版本 10.0.14383]

Test Code: https://github.com/xinthink/rnmk-demo/blob/master/app/textfields.js

const TextfieldWithPassword = mdl.Textfield.textfieldWithFloatingLabel()
  .withPassword(true)
  .withStyle(styles.textfieldWithFloatingLabel)
  .withHighlightColor(MKColor.Lime)
  .withStyle(styles.textfieldWithFloatingLabel)
  .withOnFocus(() => console.log('Focus'))
  .withOnBlur(() => console.log('Blur'))
  .withOnEndEditing((e) => console.log('EndEditing', e.nativeEvent.text))
  .withOnSubmitEditing((e) => console.log('SubmitEditing', e.nativeEvent.text))
  .withOnTextChange((e) => console.log('TextChange', e))
  .withOnChangeText((e) => console.log('ChangeText', e))
  .build();

// .... 
        <View style={styles.row}>
          <View style={styles.col}>
            <TextfieldWithPassword placeholder='密码'
              onTextChange={this.handleChangePassword}
            />
          </View>

qq 20160709173325

Crash-- commented 8 years ago

Hi,

If I understand correctly, you are testing this lib on Windows phone?

zsxsoft commented 8 years ago

@Crash-- I'm sorry but it's Android 6.0

vermiculite commented 8 years ago

I have fixed this locally, I will make a pull request.