forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
175 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.