From c164488ab837ada7c75490ec25746f7d63563313 Mon Sep 17 00:00:00 2001 From: dRand <39otrebla@users.noreply.github.com> Date: Sat, 6 Feb 2016 18:28:24 +0100 Subject: [PATCH] Update AlertIOS.js When using AlertIOS.prompt() the developer can't choose the input type, thus being forced to use 'plain-text'. This simple change allows to set input type ('secure-text' or 'login-password'), keeping as default 'plain-text'. --- Libraries/Utilities/AlertIOS.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Libraries/Utilities/AlertIOS.js b/Libraries/Utilities/AlertIOS.js index 38fd0f88c47..2c15ae805cc 100644 --- a/Libraries/Utilities/AlertIOS.js +++ b/Libraries/Utilities/AlertIOS.js @@ -94,7 +94,8 @@ class AlertIOS { onPress?: ?Function; style?: AlertButtonStyle; }>, - callback?: ?Function + callback?: ?Function, + type?: string ): void { if (arguments.length === 2) { if (typeof value === 'object') { @@ -117,7 +118,12 @@ class AlertIOS { if (!buttons) { buttons = [{ onPress: callback }]; } - this.alert(title, value, buttons, 'plain-text'); + + if (!type) { + type = 'plain-text'; + } + + this.alert(title, value, buttons, type); } }