Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

How can I truncate an OTP string of 6 digits using JS for Platform specific iOS using react native?

$
0
0

The issue I'm facing is that in iOS, I wanted to disable the property of auto-reading the OTP from messages (suggestions that come in the predictive text in the keypad). But using react native, I didn't get any solution to do so. I can't use any library because we've created a custom OTP view. Here, whenever I click on autoread OTP, so only the first digit of the OTP gets read and rest of the input fields/boxes stay empty. I want the OTP string to get truncated and each digit to get entered in the respective box. And In case, if the user enters a digit or more before the OTP comes and then clicks on the autoread OTP , then it should remove the digits entered by the user and enter the 6 digit OTP.

There are 6 TextInputs for a 6 digit OTP which I'll receive.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>