react-native-material-dropdown icon indicating copy to clipboard operation
react-native-material-dropdown copied to clipboard

Not working with RN v62

Open ganesh-papola opened this issue 4 years ago • 15 comments

react-native-material-dropdown has dependency on react-native-material-textfield

latest react native has removed proptypes which is causing the issue on react-native-material-textfield please remove proptypes or fix this

ganesh-papola avatar Jun 16 '20 13:06 ganesh-papola

Same issue here

Atom1er avatar Jun 16 '20 21:06 Atom1er

Found a work around here: https://medium.com/swlh/how-to-add-a-dropdown-list-to-react-native-2441d6fe40c2

Atom1er avatar Jun 16 '20 21:06 Atom1er

@Atom1er Thanks for the reference. But this is temporary solution . I don't want to edit node modules packages as I have multiple developers working project and yarn command is often. which removes everything....

ganesh-papola avatar Jun 18 '20 08:06 ganesh-papola

Same issue here, the workaround should be seem as temporary, when you have more than 1 developer working in the project.

BenHurMartins avatar Jun 22 '20 18:06 BenHurMartins

Same issue here

jacktiong92 avatar Jun 26 '20 07:06 jacktiong92

the app doesn't even start when using the newest expo SDK with this package. Important breaking changes

SoulKa avatar Jul 02 '20 11:07 SoulKa

same issue here

rdgomt avatar Jul 03 '20 19:07 rdgomt

Now I'm broken too. I followed the instructions on this bug patch which led me too some PRs that successfully implemented the handful of renames to Animated...etc that are required. Hoping @n4kz can merge and release, but looks like maybe he's busy?

Would be great to have textfield updated, released, and then this one released with the new commensurate dependency!

https://github.com/n4kz/react-native-material-textfield/issues/254

AtmasApps avatar Jul 05 '20 06:07 AtmasApps

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
  3. Your react-native-material-textfield dependency must be installed under react-native-material-dropdown node_modules. If not, please use the below patch or the patch from this thread instead(https://github.com/n4kz/react-native-material-textfield/issues/249)

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

OscarYuen avatar Jul 14 '20 09:07 OscarYuen

This patch didn't work here. The patch assumes react-native-material-textfield is in node_module inside react-native-material-dropdown. In my project, although the textfield is used only in dropdown, it was installed in my node_modules root by yarn decision. So, when I try to run the patch, the following error occurs:

Error: Patch file found for package react-native-material-textfield which is not present at node_modules/react-native-material-dropdown/node_modules/react-native-material-textfield

The error occur after upgrade my expo from 37 to 38, which upgraded RN to 0.62

bguaitanele avatar Jul 18 '20 15:07 bguaitanele

@bguaitanele I found the same issue you did, took a couple minutes to fix. gist here.

jehartzog avatar Jul 18 '20 15:07 jehartzog

While my first revision fix the hard crash issues, I was still getting some propType warnings and other console spam. I revised the above gist to clear those, and cleaned up a few more: react-native-material-buttons react-native-material-dropdown

jehartzog avatar Jul 18 '20 16:07 jehartzog

This patch didn't work here. The patch assumes react-native-material-textfield is in node_module inside react-native-material-dropdown. In my project, although the textfield is used only in dropdown, it was installed in my node_modules root by yarn decision. So, when I try to run the patch, the following error occurs:

Error: Patch file found for package react-native-material-textfield which is not present at node_modules/react-native-material-dropdown/node_modules/react-native-material-textfield

The error occur after upgrade my expo from 37 to 38, which upgraded RN to 0.62

For this kind of structure, I suggest to use the patch from react-native-material-textfield directly(https://github.com/n4kz/react-native-material-textfield/issues/249). Some people there made the patch for textfield directly.

OscarYuen avatar Jul 18 '20 16:07 OscarYuen

@bguaitanele I found the same issue you did, took a couple minutes to fix. gist here.

I was doing the same fix here, lol. You're faster. Anyway, for those who tried the first patch, before the second, maybe could have an error because the first fix. So, just delete your node_modules, run yarn ou npm install again, then run the second fix. Worked for me!

bguaitanele avatar Jul 18 '20 16:07 bguaitanele

You can refer to this: https://stackoverflow.com/questions/61226530/typeerror-undefined-is-not-an-object-evaluating-reactnative-animated-text-pr/62794092#62794092

react-native-material-dropdown-v2 could be the temporary solution.

yentzu-wang avatar Feb 14 '21 03:02 yentzu-wang