n4kz / react-native-material-dropdown

Material dropdown with consistent behaviour on iOS and Android
Other
732 stars 597 forks source link

finding TypeError error in 0.62 version in react native. #224

Open anshumanburman opened 4 years ago

anshumanburman commented 4 years ago
Screenshot 2020-04-07 at 10 45 12 AM
lalakiyaRahul commented 4 years ago

Yes....i have same error

lalakiyaRahul commented 4 years ago

@anshumanburman Any solution for this error.?

anshumanburman commented 4 years ago

@lalakiyaRahul not yet i have removed the library finally. if you find any solution then please let me know.

yassineKharraz commented 4 years ago

same here, please let us updated if there is a work around

raza-repo commented 4 years ago

I have the same error in React-Native 0.62

lalakiyaRahul commented 4 years ago

@anshumanburman ok.

ckasek commented 4 years ago

https://github.com/n4kz/react-native-material-dropdown/issues/220

eriffat896 commented 4 years ago

I solve this by commenting itemTextStyle: Text.propTypes.style in ..\node_modules\react-native-material-dropdown\src\components\dropdown file.

And removing Animated in Animated.Text.propTypes.style in affix/index helper/index label/index of react-native-material-textfield and added import { Animated, Text} from 'react-native'; in each of above three files.

RahulkrishnanSpericorn commented 4 years ago

Any solution????

lalakiyaRahul commented 4 years ago

@RahulkrishnanSpericorn use this #220

RahulkrishnanSpericorn commented 4 years ago

Thank you for your response

On Tue, May 5, 2020 at 2:22 PM lalakiyaRahul notifications@github.com wrote:

@RahulkrishnanSpericorn https://github.com/RahulkrishnanSpericorn use this #220 https://github.com/n4kz/react-native-material-dropdown/issues/220

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/n4kz/react-native-material-dropdown/issues/224#issuecomment-623936011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGOMTMQ7LSJQJM35K7QOLDRP7HVXANCNFSM4MC2CZ6A .

OscarYuen commented 4 years ago

I made a patch to make react-native-material-dropdown work in RN 0.62.

Requirement:

  1. Install patch-package
  2. Run yarn add patch-package postinstall-postinstall or npm i patch-package

Instruction:

  1. Create "patches" directory under your project's root
  2. Copy this patch to patches/react-native-material-dropdown++react-native-material-textfield+0.12.0.patch
  3. Run yarn patch-package or npx patch-package
  4. Fix is already applied. Add the following to package.json to make sure the fix is automatically applied next time:
    "scripts": {
    "postinstall": "patch-package"
    }

https://gist.github.com/OscarYuen/21f2f8d5c133caef7d31475cfec2d5b0#file-react-native-material-dropdown-react-native-material-textfield-0-12-0-patch

slade77777 commented 4 years ago

I found the solution for it. Let's create a bash file with content: sed -i ".bak" '/Animated.Text.propTypes.style/d' node_modules/react-native-material-textfield/src/components/helper/index.js sed -i ".bak" '/Animated.Text.propTypes.style/d' node_modules/react-native-material-textfield/src/components/affix/index.js sed -i ".bak" '/Animated.Text.propTypes.style/d' node_modules/react-native-material-textfield/src/components/label/index.js Then in postinstall, let add command to execute this file, it will remove the animated prototype inside the library