Skip to content

fix default value issue - #112

Open
MaHmoudAlmoKdaD wants to merge 1 commit into
anday013:mainfrom
MaHmoudAlmoKdaD:fix/pass-default-value
Open

MaHmoudAlmoKdaD wants to merge 1 commit into
anday013:mainfrom
MaHmoudAlmoKdaD:fix/pass-default-value

Conversation

@MaHmoudAlmoKdaD

@MaHmoudAlmoKdaD MaHmoudAlmoKdaD commented Nov 12, 2025 •

Copy link
Copy Markdown

Summary:

  • Added support for defaultValue in OtpInput.
  • Initialized input state with defaultValue.
  • Synced text state when defaultValue changes dynamically.
  • Simplified useImperativeHandle (removed unused blur method).

Impact:

  • Enables pre-filling OTP fields (e.g., saved codes, autofill).
  • No breaking changes to existing API.
  • Maintains backward compatibility and consistent behavior.

This branch has not been deployed

No deployments
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