Skip to content

fix(InputOTP): InputOTP component feature#54

Merged
wangdicoder merged 3 commits intomasterfrom
input-otp-component-feature
Mar 17, 2026
Merged

fix(InputOTP): InputOTP component feature#54
wangdicoder merged 3 commits intomasterfrom
input-otp-component-feature

Conversation

@wangdicoder
Copy link
Owner

Summary

  • Refine InputOTP behaviour to fire onChange on every value update instead of only when all cells are filled.
  • Fix masked cell rendering logic and caret colour, improving UX and visual consistency.
  • Update docs, examples, and add Chinese documentation & routing for InputOTP.

Details

  • InputOTP now computes the previous and next values from all cells and calls onChange only when the value string actually changes.
  • Masked cells now respect custom string masks while preserving the underlying value, and caret colour follows the current text colour.
  • Tests updated to assert onChange is called on each intermediate input; separator demo and docs adjusted to match the new behaviour.

@wangdicoder wangdicoder merged commit b81d406 into master Mar 17, 2026
1 check passed
@github-actions github-actions bot mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant