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

getting issue in iOS [javascript] TypeError: [style].flat is not a function. (In '[style].flat()', '[style].flat' is undefined) This error is located at: in Picker (at dropdown/index.js:100)

Open ghost opened this issue 4 years ago • 2 comments

I am getting this error in IOS but in android its working fine.

thanks in advance for help and support!

ghost avatar Jun 22 '21 12:06 ghost

To support iOS 11 and below, you can add array-flat-polyfill to your project, then add to your App.js: import 'array-flat-polyfill' It will only add the polyfill, if it doesn't already exist.

reference: https://github.com/facebook/react-native/issues/26283

navin-d97 avatar Aug 04 '21 12:08 navin-d97

@navin-d97 this is a fantastic pointer! Would you mind making a PR to the docs anywhere that seems correct? They're in here: https://github.com/hossein-zare/react-native-dropdown-picker-website

mikehardy avatar Aug 04 '21 13:08 mikehardy