zbtang / react-native-textinputlayout Goto Github PK
View Code? Open in Web Editor NEWPure js implemention material design TextInputLayout component for react-native
License: MIT License
Pure js implemention material design TextInputLayout component for react-native
License: MIT License
Warning:U R manually calling a React .PropTypes validation function for the 'position' prop on 'StyleSheet fullscreen '.
when the text is pre-set, the floating label stays down.
also consider the case when new text is simply passed as new prop
this might fix the first issue it but I cannot test it very well atm
_handleChildren(props) {
let edtChild = React.Children.only(props.children);
this._oriEdtChild = edtChild;
this._oriEdtStyle = StyleSheet.flatten([edtChild.props.style])
this._oriOnFocus = edtChild.props.onFocus;
this._oriOnBlur = edtChild.props.onBlur;
this._oriOnChangeText = edtChild.props.onChangeText;
+ const textValue = edtChild.props.value
+ if (textValue) {
+ this._edtText = textValue
+ this.state.showLabel = true
+ this.state.labelAnimationValue = new Animated.Value(1)
+ }
....
Error while updating property 'transform' of a view managed by: RCTText.
When trying to use TextInputLayout.
It was working before but giving this error.
When I install your demo app it works fine but, when attempting to integrate it into my own it does not. See in the image below the bottom bar of the text is duplicated...?
render() {
return (
<View style={styles.container}>
<TextInputLayout style={styles.inputLayout}>
<TextInput
style={styles.textInput}
placeholder={'Password'}
secureTextEntry={true}
/>
</TextInputLayout>
</View>
);
}
});
const styles = StyleSheet.create({
container: {
flex: 1
},
textInput: {
fontSize: 16,
marginTop: 20,
height: 40
},
inputLayout: {
marginTop: 16,
marginHorizontal: 36
}
});
can you please add opportunity for adding custom font for label. Right now i copied your TextInputLayout.js and add custom font manually. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.