support null titles in AlertIOS

Reviewed By: achen1

Differential Revision: D5807055

fbshipit-source-id: f79579d4cffb9792f49f89a7fb8f7df8e082a3a9
This commit is contained in:
Lincoln Hochberg 2017-09-11 15:51:23 -07:00 committed by Facebook Github Bot
parent 6114f863c3
commit d726c2c8ca
1 changed files with 3 additions and 5 deletions

View File

@ -109,9 +109,7 @@ class AlertIOS {
* Create and display a popup alert.
* @static
* @method alert
* @param title The dialog's title.
*
* An empty string hides the title.
* @param title The dialog's title. Passing null or '' will hide the title.
* @param message An optional message that appears below
* the dialog's title.
* @param callbackOrButtons This optional argument should
@ -211,7 +209,7 @@ class AlertIOS {
var callback = type;
var defaultValue = message;
RCTAlertManager.alertWithArgs({
title: title,
title: title || '',
type: 'plain-text',
defaultValue,
}, (id, value) => {
@ -244,7 +242,7 @@ class AlertIOS {
}
RCTAlertManager.alertWithArgs({
title: title,
title: title || '',
message: message || undefined,
buttons,
type: type || undefined,