Not working with RN v62
ganesh-papola opened this issue ยท 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
Same issue here
Found a work around here:
https://medium.com/swlh/how-to-add-a-dropdown-list-to-react-native-2441d6fe40c2
@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....
Same issue here, the workaround should be seem as temporary, when you have more than 1 developer working in the project.
Same issue here
the app doesn't even start when using the newest expo SDK with this package. Important breaking changes
same issue here
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!
I made a patch to make react-native-material-dropdown work in RN 0.62.
Requirement:
- Install patch-package
- Run
yarn add patch-package postinstall-postinstall
ornpm i patch-package
- 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(n4kz/react-native-material-textfield#249)
Instruction:
- Create "patches" directory under your project's root
- Copy this patch to patches/react-native-material-dropdown++react-native-material-textfield+0.12.0.patch
- Run
yarn patch-package
ornpx patch-package
- Fix is already applied. Add the following to package.json to make sure the fix is automatically applied next time:
"scripts": {
"postinstall": "patch-package"
}
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 I found the same issue you did, took a couple minutes to fix. gist here.
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
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(n4kz/react-native-material-textfield#249).
Some people there made the patch for textfield directly.
@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!
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.