File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ class AlertIOS {
110110 * @static
111111 * @method alert
112112 * @param title The dialog's title.
113+ *
114+ * An empty string hides the title.
113115 * @param message An optional message that appears below
114116 * the dialog's title.
115117 * @param callbackOrButtons This optional argument should
@@ -209,7 +211,7 @@ class AlertIOS {
209211 var callback = type ;
210212 var defaultValue = message ;
211213 RCTAlertManager . alertWithArgs ( {
212- title : title || undefined ,
214+ title : title ,
213215 type : 'plain-text' ,
214216 defaultValue,
215217 } , ( id , value ) => {
@@ -242,7 +244,7 @@ class AlertIOS {
242244 }
243245
244246 RCTAlertManager . alertWithArgs ( {
245- title : title || undefined ,
247+ title : title ,
246248 message : message || undefined ,
247249 buttons,
248250 type : type || undefined ,
Original file line number Diff line number Diff line change @@ -110,6 +110,18 @@ class SimpleAlertExampleBlock extends React.Component {
110110 < Text > Alert that cannot be dismissed</ Text >
111111 </ View >
112112 </ TouchableHighlight >
113+ < TouchableHighlight style = { styles . wrapper }
114+ onPress = { ( ) => Alert . alert (
115+ '' ,
116+ alertMessage ,
117+ [
118+ { text : 'OK' , onPress : ( ) => console . log ( 'OK Pressed!' ) } ,
119+ ]
120+ ) } >
121+ < View style = { styles . button } >
122+ < Text > Alert without title</ Text >
123+ </ View >
124+ </ TouchableHighlight >
113125 </ View >
114126 ) ;
115127 }
You can’t perform that action at this time.
0 commit comments