Open sudharsan1988 opened 8 years ago
I solved this with custom labels in tcomb-form-native but text box still goes empty when validation occurs. For example, if I leave all the fields empty and press the button, I can see the validation and everything is fine. Here is the problem, when I try to fill the data but move onto other field without filling it, which makes that label/placeholder empty. But floating label displays on focus event.
Am I missing something here?
When I add the Factory, my placeholder got hidden. But this library works when I removed auto: 'none' on the options. Is this how it works or it can work with custom place holders too?
This one is not working: I mean the placeholder is not visible
var options = { auto: 'none',
fields: { firstName: { placeholder: 'FIRSTNAME', placeholderTextColor:'#FFFFFF', textAlign: 'center', factory: FloatingLabel, stylesheet: stylesheet, // overriding the style of the textbox }, lastName: { placeholder: 'LASTNAME', placeholderTextColor:'#FFFFFF', stylesheet: stylesheet, // overriding the style of the textbox }, email: { placeholder: 'EMAIL', placeholderTextColor:'#FFFFFF', keyboardType: 'email-address', //onSubmitEditing: () => this.refs.form.getComponent('password').refs.input.focus(), stylesheet: stylesheet, // overriding the style of the textbox }, password: { placeholder: 'PASSWORD', placeholderTextColor:'#FFFFFF', secureTextEntry: true, stylesheet: stylesheet, // overriding the style of the textbox }
} };
But this one works but don't show my custom placeholder,
var options = {
fields: { firstName: { placeholder: 'FIRSTNAME', placeholderTextColor:'#FFFFFF', textAlign: 'center', factory: FloatingLabel, stylesheet: stylesheet, // overriding the style of the textbox }, lastName: { placeholder: 'LASTNAME', placeholderTextColor:'#FFFFFF', stylesheet: stylesheet, // overriding the style of the textbox }, email: { placeholder: 'EMAIL', placeholderTextColor:'#FFFFFF', keyboardType: 'email-address', //onSubmitEditing: () => this.refs.form.getComponent('password').refs.input.focus(), stylesheet: stylesheet, // overriding the style of the textbox }, password: { placeholder: 'PASSWORD', placeholderTextColor:'#FFFFFF', secureTextEntry: true, stylesheet: stylesheet, // overriding the style of the textbox }
} };
Thank you for your help.