react-native-material-dropdown
react-native-material-dropdown copied to clipboard
finding TypeError error in 0.62 version in react native.

Yes....i have same error
@anshumanburman Any solution for this error.?
@lalakiyaRahul not yet i have removed the library finally. if you find any solution then please let me know.
same here, please let us updated if there is a work around
I have the same error in React-Native 0.62
@anshumanburman ok.
https://github.com/n4kz/react-native-material-dropdown/issues/220
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.
Any solution????
@RahulkrishnanSpericorn use this #220
Thank you for your response
On Tue, May 5, 2020 at 2:22 PM lalakiyaRahul [email protected] 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 .
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
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"
}
https://gist.github.com/OscarYuen/21f2f8d5c133caef7d31475cfec2d5b0#file-react-native-material-dropdown-react-native-material-textfield-0-12-0-patch
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