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

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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 15 (4 by maintainers)

Most upvoted comments

@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

@janpieterz It’s has just been released

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

npm was no update!

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

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.

Fixed with commit 13413a06907a9901900f4b8c61affbc982f7f5ed