diff --git a/node_modules/react-native-material-textfield/src/components/affix/index.js b/node_modules/react-native-material-textfield/src/components/affix/index.js
index 0f85022..c12b3a6 100644
--- a/node_modules/react-native-material-textfield/src/components/affix/index.js
+++ b/node_modules/react-native-material-textfield/src/components/affix/index.js
@@ -11,7 +11,7 @@ export default class Affix extends PureComponent {
static propTypes = {
numberOfLines: PropTypes.number,
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
color: PropTypes.string.isRequired,
fontSize: PropTypes.number.isRequired,
diff --git a/node_modules/react-native-material-textfield/src/components/field-outlined/index.js b/node_modules/react-native-material-textfield/src/components/field-outlined/index.js
index 7005ddf..d1ac45f 100644
--- a/node_modules/react-native-material-textfield/src/components/field-outlined/index.js
+++ b/node_modules/react-native-material-textfield/src/components/field-outlined/index.js
@@ -31,7 +31,6 @@ export default class OutlinedTextField extends TextField {
constructor(props) {
super(props);
-
this.onTextLayout = this.onTextLayout.bind(this);
this.state.labelWidth = new Animated.Value(0);
}
@@ -51,11 +50,11 @@ export default class OutlinedTextField extends TextField {
return super.renderLabel({ ...props, onTextLayout });
}
- renderLine(props) {
- let { labelWidth } = this.state;
+ renderLine(props, hasLabel) {
+ let { labelWidth } = this.state;
return (
-
+
);
}
}
diff --git a/node_modules/react-native-material-textfield/src/components/field/index.js b/node_modules/react-native-material-textfield/src/components/field/index.js
index 494bbaa..a94f4bc 100644
--- a/node_modules/react-native-material-textfield/src/components/field/index.js
+++ b/node_modules/react-native-material-textfield/src/components/field/index.js
@@ -221,7 +221,8 @@ export default class TextField extends PureComponent {
let options = {
toValue: this.focusState(),
- duration,
+ duration,
+ useNativeDriver: false
};
startAnimation(focusAnimation, options, this.onFocusAnimationEnd);
@@ -644,7 +645,8 @@ export default class TextField extends PureComponent {
baseColor,
errorColor,
containerStyle,
- inputContainerStyle: inputContainerStyleOverrides,
+ inputContainerStyle: inputContainerStyleOverrides,
+ label
} = this.props;
let restricted = this.isRestricted();
@@ -702,11 +704,11 @@ export default class TextField extends PureComponent {
return (
- {this.renderLine(lineProps)}
+ {this.renderLine(lineProps, !!label)}
{this.renderAccessory('renderLeftAccessory')}
- {this.renderLabel(styleProps)}
+ {label && this.renderLabel(styleProps)}
{this.renderAffix('prefix')}
diff --git a/node_modules/react-native-material-textfield/src/components/helper/index.js b/node_modules/react-native-material-textfield/src/components/helper/index.js
index 6060f9f..fe9d9c4 100644
--- a/node_modules/react-native-material-textfield/src/components/helper/index.js
+++ b/node_modules/react-native-material-textfield/src/components/helper/index.js
@@ -11,7 +11,7 @@ export default class Helper extends PureComponent {
disabled: PropTypes.bool,
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
baseColor: PropTypes.string,
errorColor: PropTypes.string,
diff --git a/node_modules/react-native-material-textfield/src/components/label/index.js b/node_modules/react-native-material-textfield/src/components/label/index.js
index 82eaf03..809fcdd 100644
--- a/node_modules/react-native-material-textfield/src/components/label/index.js
+++ b/node_modules/react-native-material-textfield/src/components/label/index.js
@@ -43,7 +43,7 @@ export default class Label extends PureComponent {
y1: PropTypes.number,
}),
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
label: PropTypes.string,
};
diff --git a/node_modules/react-native-material-textfield/src/components/outline/index.js b/node_modules/react-native-material-textfield/src/components/outline/index.js
index 9347a99..0dce44d 100644
--- a/node_modules/react-native-material-textfield/src/components/outline/index.js
+++ b/node_modules/react-native-material-textfield/src/components/outline/index.js
@@ -79,14 +79,14 @@ export default class Line extends PureComponent {
}
render() {
- let { lineType, labelWidth, labelAnimation, contentInset } = this.props;
+ let { lineType, labelWidth, labelAnimation, contentInset, hasLabel } = this.props;
if ('none' === lineType) {
return null;
- }
+ }
- let labelOffset = 2 * (contentInset.left - 2 * borderRadius);
- let lineOffset = Animated.add(labelWidth, labelOffset);
+ let labelOffset = hasLabel ? 2 * (contentInset.left - 2 * borderRadius) : 0;
+ let lineOffset = Animated.add(labelWidth, labelOffset);
let topLineContainerStyle = {
transform: [{