lotosbin / react-native-pin-input

react native pin input
MIT License
5 stars 8 forks source link

clear input multiple digits using 'back' button in keyboard #17

Open b-asaf opened 6 years ago

b-asaf commented 6 years ago

Hi @lotosbin ,

currently I can only delete/clear only one digit, the one that is currently with the focus. Is it possible to add the option to delete/clear all of the entered digits one by one, using the back/clear key in the keyboard?

Thanks

lotosbin commented 6 years ago

@assafb81 this feature depends on the onKeyPress event, but onKeyPress is only worked on ios now.

lotosbin commented 6 years ago

https://github.com/facebook/react-native/pull/14720

b-asaf commented 6 years ago

thanks @lotosbin, why not use 'onKeyUp' or 'onKeydown' events for Android - as its written in Handling Keyboard Actions?

@lotosbin , do you think this can be done using one of the events above?