n4kz / react-native-material-textfield

Material textfield
Other
901 stars 831 forks source link

Please if possible make the update you are awesome for providing us with this package #327

Open bswnth opened 3 years ago

bswnth commented 3 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-material-textfield@0.12.0 for the project I'm working on.

Here is the diff that solved my problem:

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 d6c9d64..fe8eb0a 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
@@ -1,6 +1,6 @@
 import PropTypes from 'prop-types';
 import React, { PureComponent } from 'react';
-import { Animated } from 'react-native';
+import { Animated, Text } from 'react-native';

 import styles from './styles';

@@ -24,7 +24,7 @@ export default class Affix extends PureComponent {
     baseColor: PropTypes.string.isRequired,
     animationDuration: PropTypes.number.isRequired,

-    style: Animated.Text.propTypes.style,
+    style: Text.propTypes.style,

     children: PropTypes.oneOfType([
       PropTypes.arrayOf(PropTypes.node),
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 60184ea..84e6e3a 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
@@ -1,6 +1,6 @@
 import PropTypes from 'prop-types';
 import React, { PureComponent } from 'react';
-import { View, Animated } from 'react-native';
+import { View, Animated, Text } from 'react-native';

 import styles from './styles';

@@ -10,7 +10,7 @@ export default class Helper extends PureComponent {
   };

   static propTypes = {
-    style: Animated.Text.propTypes.style,
+    style: Text.propTypes.style,
     children: PropTypes.oneOfType([
       PropTypes.arrayOf(PropTypes.node),
       PropTypes.node,
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 ac3ed53..bf551e3 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
@@ -1,6 +1,6 @@
 import PropTypes from 'prop-types';
 import React, { PureComponent } from 'react';
-import { Animated } from 'react-native';
+import { Animated, Text } from 'react-native';

 export default class Label extends PureComponent {
   static defaultProps = {
@@ -29,7 +29,7 @@ export default class Label extends PureComponent {

     animationDuration: PropTypes.number.isRequired,

-    style: Animated.Text.propTypes.style,
+    style: Text.propTypes.style,

     children: PropTypes.oneOfType([
       PropTypes.arrayOf(PropTypes.node),

This issue body was partially generated by patch-package.

gabrieldonadel commented 3 years ago

Hi @bswnth, unfortunately there are a lot of known bugs in react-native-material-textfield and this lib appears to be abandoned. I suggest you using this fork rn-material-ui-textfield that has fixed these and some other bugs.

If you want to give it a try just run


npm install --save rn-material-ui-textfield