NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

ActionSheet is not usable as a native method argument in RN 0.58.0

Open ggdegreat opened this issue 7 years ago • 15 comments

Issue Description

node 10.14.1 npm 6.4.1 react-native 0.58.0 react 16.6.3 native-base 2.8.0 expo none xcode none

Expected behaviour

After update to RN 0.58, i expect it just working fine like before. previous RN is 0.57

Actual behaviour

When calling ActionSheet.show... it give an error like in screenshot below:

actionsheet

Is the bug present in both iOS and Android or in any one of them?

Android. IOS never tested

ggdegreat avatar Feb 01 '19 00:02 ggdegreat

I am getting the exact same error

Udbhav12 avatar Feb 01 '19 06:02 Udbhav12

@ggdegreat @Udbhav12 The issue was due to height: this.state.length * 80, in https://github.com/GeekyAnts/NativeBase/blob/master/src/basic/Actionsheet.js Line 101... Fixed with height: this.state.items.length * 80, We will update that soon with next release. Thanks... screen shot 1440-05-26 at 6 29 49 pm

suvenduchhatoi avatar Feb 01 '19 12:02 suvenduchhatoi

Fixed with commit 13413a06907a9901900f4b8c61affbc982f7f5ed

suvenduchhatoi avatar Feb 05 '19 09:02 suvenduchhatoi

This is the wrong fix, but you assumed it was correct just because it made the error go away, correct? I'm going to ignore the fact that declaring styles inline and outside of StyleSheet.create is a minor performance issue according to the native-base docs. Notice the extra space underneath the "Cancel" button in your screenshot. It's there because the height of each ListItem is not actually 80. The actionsheet looked much better before because the height property was broken and did not evaluate to what you changed it to now.

lone-cloud avatar Feb 06 '19 00:02 lone-cloud

@suvenduchhatoi : Your suggestion cant fix my problem.

bepehr avatar Feb 06 '19 09:02 bepehr

@bepehr Are you doing a fresh native-base installation after removing node_modules and clearing cache

suvenduchhatoi avatar Feb 06 '19 10:02 suvenduchhatoi

@suvenduchhatoi : yes i did this steps 1 . delete node_modules folders 2 . yarn cache clean 3 . yarn 4 . edit /node_modules/native-base/src/basic/ActionSheet.js 5 . react-native run-android

but still got same error

bepehr avatar Feb 06 '19 13:02 bepehr

@suvenduchhatoi : sory my mistake , i have to replace /node_modules/native-base/dist/src/basic/Actionsheet.js and Actionsheet.js.map with your commit files , it fixed now. thank you

bepehr avatar Feb 06 '19 13:02 bepehr

@hoboman313 The extra space is due to less number of options as Actionsheet items in the example snippet. If you increase the number of options, and scroll down to the last option, you can see the difference... screen shot 1440-06-01 at 7 26 41 pm

suvenduchhatoi avatar Feb 06 '19 14:02 suvenduchhatoi

npm was no update!

cgfeel avatar Feb 10 '19 08:02 cgfeel

npm update NativeBase 2.11.0, the problem still remain. please update npm source code

cgfeel avatar Feb 10 '19 08:02 cgfeel

@suvenduchhatoi Any idea on when the new release containing this will be cut?

janpieterz avatar Feb 19 '19 08:02 janpieterz

@janpieterz It's has just been released

lorisdev avatar Feb 22 '19 09:02 lorisdev

I saw it yeah, tested and confirmed.

janpieterz avatar Feb 22 '19 10:02 janpieterz

Focus on that <<NaN>>, for me that was causing the issue.

NightWarrior avatar Feb 24 '20 11:02 NightWarrior