react-native-pin-code icon indicating copy to clipboard operation
react-native-pin-code copied to clipboard

Is there a "Enter PIN cancel" option I'm missing?

Open ntbutler87 opened this issue 10 months ago • 0 comments

First of all - great component, 99% fits exactly what I'm after.

Is there a function that allows the user to cancel out of the PIN ENTER mode? In some similar PIN entry products, the "delete" button would either change to "cancel" if there's no current value for the entered pin, or there would be a specific cancel button that can be triggered to hide the PIN entry component - for example the Cancel button that is visible at the lower-right of the iOS lock screen.

Is there an existing function that would allow for this kind of operation in this component? There's the onSetCancel prop and the onEnter prop, but neither of these seem to be appropriate for if a user wants to simply quit out of the PIN entry screen - they either need to enter the correct PIN (to trigger the onEnter function), or the app would need to be in the SET to get the available onSetCancel option. I can see a possibility of changing the textOptions for the enter mode to {enter:{footerText:"Cancel"}} and using the onReset trigger, but that's obviously not ideal.

Cheers!

ntbutler87 avatar Apr 08 '24 10:04 ntbutler87