composeuisuite / ohteepee

A Simple, Customizable, Easy-to-use OTP/Pin Jetpack Compose Library
Apache License 2.0
142 stars 9 forks source link

Disable taps on random cells #12

Closed ankur2136 closed 8 months ago

ankur2136 commented 8 months ago

Tapping on any cell would take to the next unfilled value. If one of the cells is already filled and a tap happens on that cell, it is focussed and edits would continue from that cell onwards.

See attached video for full demo.

https://github.com/composeuisuite/ohteepee/assets/6739498/6de6949b-4a3b-4ed1-9f2d-8d8dd824ce41

ilyasipek commented 8 months ago

This is a feature, not a bug :) This is actually something we wanted cuz sometimes the user can enter the wrong number and want to edit it. Thanks for the suggestion.

ankur2136 commented 8 months ago

I agree to the feature where the user should be able to edit the previously filled cell.

In the current version, let's say you have 4 cells and none of them are filled, then user shouldn't be able to fill any cell other than cell#0

In the attached video you can see at the very end that if we entered 21 then user is able to go back to cell with text 2 and edit it. This just prevents users from jumping forward