From 3c5eca2be12266ba13183dcdadc712808d10ca97 Mon Sep 17 00:00:00 2001 From: Maximilly M Date: Thu, 24 Oct 2019 09:33:06 -0300 Subject: [PATCH] hide message when inputAttributes has secureTextEntry --- lib/steps/text/TextStep.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/steps/text/TextStep.js b/lib/steps/text/TextStep.js index c160d29..3dbed1b 100644 --- a/lib/steps/text/TextStep.js +++ b/lib/steps/text/TextStep.js @@ -49,6 +49,10 @@ class TextStep extends Component { message = message.replace(/{previousValue}/g, previousValue); + if(step.inputAttributes && step.inputAttributes.secureTextEntry){ + return '*'.repeat(message.length) + } + return message; }