-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
AlertIOS.prompt() default values are broken #5273
Labels
Resolution: Locked
This issue was locked by the bot.
Comments
Hey corbt, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
Closed
Thanks @corbt! |
ghost
pushed a commit
that referenced
this issue
Jan 21, 2016
Summary: Ok, so this started as fixing #5273 but ended up getting a little more complicated. 😄 Currently, AlertIOS has the following API: * `alert(title, message, buttons, type)` * `prompt(title, defaultValue, buttons, callback)` I've changed the API to look like the following: * `alert(title, message, callbackOrButtons)` * `prompt(title, message, callbackOrButtons, type, defaultValue)` I know that breaking changes are a big deal, but I find the current alert API to be fairly inconsistent and unnecessarily confusing. I'll try to justify my changes one by one: 1. Currently `type` is an optional parameter of `alert`. However, the only reason to change the alert type from the default is in order to create one of the input dialogs (text, password or username/password). So we're in a weird state where if you want a normal text input, you use `prompt`, but if you want a password input you use `alert` with the 'secure-text' type. I've moved `type` to `prompt` so all text input is now done with `pro Closes #5286 Reviewed By: svcscm Differential Revision: D2850400 Pulled By: androidtrunkagent fb-gh-sync-id: 2986cfa2266225df7e4dcd703fce1e322c12b816
doostin
pushed a commit
to doostin/react-native
that referenced
this issue
Feb 1, 2016
Summary: Ok, so this started as fixing facebook#5273 but ended up getting a little more complicated. 😄 Currently, AlertIOS has the following API: * `alert(title, message, buttons, type)` * `prompt(title, defaultValue, buttons, callback)` I've changed the API to look like the following: * `alert(title, message, callbackOrButtons)` * `prompt(title, message, callbackOrButtons, type, defaultValue)` I know that breaking changes are a big deal, but I find the current alert API to be fairly inconsistent and unnecessarily confusing. I'll try to justify my changes one by one: 1. Currently `type` is an optional parameter of `alert`. However, the only reason to change the alert type from the default is in order to create one of the input dialogs (text, password or username/password). So we're in a weird state where if you want a normal text input, you use `prompt`, but if you want a password input you use `alert` with the 'secure-text' type. I've moved `type` to `prompt` so all text input is now done with `pro Closes facebook#5286 Reviewed By: svcscm Differential Revision: D2850400 Pulled By: androidtrunkagent fb-gh-sync-id: 2986cfa2266225df7e4dcd703fce1e322c12b816
Fixed in #5286 |
rozele
referenced
this issue
in microsoft/react-native-windows
May 25, 2016
Summary: Ok, so this started as fixing #5273 but ended up getting a little more complicated. 😄 Currently, AlertIOS has the following API: * `alert(title, message, buttons, type)` * `prompt(title, defaultValue, buttons, callback)` I've changed the API to look like the following: * `alert(title, message, callbackOrButtons)` * `prompt(title, message, callbackOrButtons, type, defaultValue)` I know that breaking changes are a big deal, but I find the current alert API to be fairly inconsistent and unnecessarily confusing. I'll try to justify my changes one by one: 1. Currently `type` is an optional parameter of `alert`. However, the only reason to change the alert type from the default is in order to create one of the input dialogs (text, password or username/password). So we're in a weird state where if you want a normal text input, you use `prompt`, but if you want a password input you use `alert` with the 'secure-text' type. I've moved `type` to `prompt` so all text input is now done with `pro Closes facebook/react-native#5286 Reviewed By: svcscm Differential Revision: D2850400 Pulled By: androidtrunkagent fb-gh-sync-id: 2986cfa2266225df7e4dcd703fce1e322c12b816
aleclarson
pushed a commit
to aleclarson/react-native
that referenced
this issue
Sep 5, 2016
Summary: Ok, so this started as fixing facebook#5273 but ended up getting a little more complicated. 😄 Currently, AlertIOS has the following API: * `alert(title, message, buttons, type)` * `prompt(title, defaultValue, buttons, callback)` I've changed the API to look like the following: * `alert(title, message, callbackOrButtons)` * `prompt(title, message, callbackOrButtons, type, defaultValue)` I know that breaking changes are a big deal, but I find the current alert API to be fairly inconsistent and unnecessarily confusing. I'll try to justify my changes one by one: 1. Currently `type` is an optional parameter of `alert`. However, the only reason to change the alert type from the default is in order to create one of the input dialogs (text, password or username/password). So we're in a weird state where if you want a normal text input, you use `prompt`, but if you want a password input you use `alert` with the 'secure-text' type. I've moved `type` to `prompt` so all text input is now done with `pro Closes facebook#5286 Reviewed By: svcscm Differential Revision: D2850400 Pulled By: androidtrunkagent fb-gh-sync-id: 2986cfa2266225df7e4dcd703fce1e322c12b816
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently when using
AlertIOS.prompt()
with a default prompt value, that value is applied as the prompt's message, not the default value as the docs indicate. It looks like this regression was introduced between 0.16 and 0.17.RN 0.16

## RN 0.18-rcI'm planning on looking into this today or tomorrow.
The text was updated successfully, but these errors were encountered: