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

Android not work #27

Open
wgltony opened this issue Jan 12, 2018 · 4 comments
Open

Android not work #27

wgltony opened this issue Jan 12, 2018 · 4 comments

Comments

@wgltony
Copy link

wgltony commented Jan 12, 2018

Can not get input text value.

@Noitidart
Copy link

May you share your code it works for me.

@edualm
Copy link

edualm commented Jan 22, 2018

Late to the party, but may help someone:

I had this problem, and order apparently counts.

The cancel argument needs to be the first, like this:

[
                { text: 'Cancel' },
                { text: 'OK', onPress: input => {} }
],

The following will not work under Android:

[
                { text: 'OK', onPress: input => {} }
                { text: 'Cancel' },
],

This is probably a bug, though.

@Noitidart
Copy link

@wgltony may you please edit the bug title per @edualm's explanation. Maybe title it "Order of options matters on Android".

@Noitidart
Copy link

@edualm you are correct order matters - https://github.com/shimohq/react-native-prompt-android/blob/master/index.android.js#L106

I updated the readme to reflect this.

The third argument can be the following:

()=>void | [ButtonPositive] | [ButtonNegative, ButtonPositive] | [ButtonNeutral, ButtonNegative, ButtonPositive],

Where ()=>void is callback on press of "OK".

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

No branches or pull requests

3 participants