diff --git a/index.tsx b/index.tsx index 6c56ef8..e5b4c3f 100644 --- a/index.tsx +++ b/index.tsx @@ -152,6 +152,12 @@ export default class OTPInputView extends Component 0) { this.handleChangeText(index - 1, '') + const digits = this.getDigits(); + const newdigits = digits.slice(); + + this.setState({ + digits: newdigits.map((item, i) => (i === index - 1 ? "" : item)), + }); this.focusField(index - 1) } }