n4kz / react-native-material-dropdown

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

Not working with RN v62 #241

Open ganesh-papola opened 4 years ago

ganesh-papola commented 4 years ago

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

Atom1er commented 4 years ago

Same issue here

Atom1er commented 4 years ago

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

ganesh-papola commented 4 years ago

@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....

BenHurMartins commented 4 years ago

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

jacktiong92 commented 4 years ago

Same issue here

SoulKa commented 4 years ago

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

rdgomt commented 4 years ago

same issue here

AtmasApps commented 4 years ago

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

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
  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

bguaitanele commented 4 years ago

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

jehartzog commented 4 years ago

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

jehartzog commented 4 years ago

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

OscarYuen commented 4 years ago

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.

bguaitanele commented 4 years ago

@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!

yentzu-wang commented 3 years ago

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.