xfscrypt
xfscrypt

Reputation: 276

React Native: How to hide keyboard after touch id password input

How do I hide a keyboard when a is active and auto-filled after a touch-id verification?

Basically I am loading a username and password combination and I want to hide the keyboard once that process is done.

Upvotes: 0

Views: 219

Answers (1)

Gaurav Roy
Gaurav Roy

Reputation: 12210

I suppose you are using react-native-touch-id rn-touch-id so now when there is success in fingertprint id scan you can just simply do :

import {Keyboard} from 'react-native';

 TouchID.authenticate('to demo this react-native component', optionalConfigObject)
      .then(success => {
        Keyboard.dismiss()
      })
      .catch(error => {
         Keyboard.dismiss()
      });

hope it helps.

Upvotes: 2

Related Questions