Skip to content

fix(input-otp): sync value when length changes - #31485

Open
hemanth004 wants to merge 4 commits into
ionic-team:mainfrom
hemanth004:fix-input-otp-length-sync
Open

hemanth004 wants to merge 4 commits into
ionic-team:mainfrom
hemanth004:fix-input-otp-length-sync

Conversation

@hemanth004

Copy link
Copy Markdown

Issue number: resolves #31484


What is the current behavior?

Changing the length prop at runtime updates the rendered input boxes but can leave the public value longer than the rendered inputs.

What is the new behavior?

The component now reinitializes its values and tab indexes when length changes, keeping the public value synchronized with the rendered inputs.

  • Added a runtime length-change end-to-end regression test.
  • ESLint passes for the changed files.
  • Targeted Playwright execution is pending because the local browser executable is unavailable.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Fixes #31484. No dependency updates or breaking API changes.

@hemanth004
hemanth004 requested a review from a team as a code owner September 25, 2026 10:03
@hemanth004
hemanth004 requested a review from ShaneK September 25, 2026 10:03
@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@hemanth004 is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the package: core @ionic/core package label Sep 25, 2026
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Oct 1, 2026 1:36pm UTC

Request Review

@ShaneK

ShaneK commented Oct 1, 2026

Copy link
Copy Markdown
Member

Hey @hemanth004 ! Thanks for your pull request and bug report!

I've updated your PR with some fixes - the initial wouldn't have built, but also I think there's a few things in the scope of this fix that also needed to be addressed. Everything in this PR should work now, but it'll need to be reviewed by another member of the team before we can merge it, then the fix will go out in the next patch release after that.

This branch was successfully deployed

1 active deployment
Preview — e24c0de9 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(input-otp): changing length leaves value longer than rendered inputs

2 participants