Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The callback of ActionSheet on Android receives a string index #1353

Closed
bflatmajor opened this issue Nov 9, 2017 · 2 comments
Closed

The callback of ActionSheet on Android receives a string index #1353

bflatmajor opened this issue Nov 9, 2017 · 2 comments
Labels

Comments

@bflatmajor
Copy link

react-native, react and native-base version

  • React Native: 0.49.3.
  • React: 16.0.0-beta.5.
  • Native Base: 2.3.3.

Expected behaviour

Type of index should be number, like iOS.

Actual behaviour

Is string.

Steps to reproduce (code snippet or screenshot)

ActionSheet.show({
    options: [
        // ...
    ]
}, (index) => {
    console.log(typeof index); // => 'string'
});

Is the bug present in both ios and android or in any one of them?

On Android.

@akhil-ga
Copy link
Contributor

Made a PR #1370 for this issue

akhil-ga added a commit that referenced this issue Nov 29, 2017
Issue - Actionsheet of android returns buttonIndex as string instead of number
SupriyaKalghatgi added a commit that referenced this issue Dec 7, 2017
Fix for #1353.
The callback of `ActionSheet` on Android receives a string index
@SupriyaKalghatgi
Copy link
Contributor

Fixed with NativeBase 2.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants