Skip to content

Conversation

@gvreddy04
Copy link
Contributor

No description provided.

- Refactored OTPInput component to use more specific JS interop functions: replaced FocusElement with FocusInputElement and added SetInputElementValue for programmatically clearing input fields.
- Added debug Console.WriteLine statements to OTPInput for easier tracing.
- Updated OTP input margin class from MarginEnd1 to MarginEnd2 for improved spacing.
- Added a new CharExtensions static class with an IsAlphanumeric extension method for char.
Refactored the OnInput method to sanitize input by allowing only digits, handle pasted or fast-typed multiple digits by using the last digit, and clear invalid input both in state and DOM. Updated the input field if the raw value doesn't match the sanitized digit and streamlined focus movement logic. Removed unnecessary else branches and debug statements for cleaner code.
@gvreddy04 gvreddy04 added this to the 4.0.0 milestone Jan 7, 2026
@gvreddy04 gvreddy04 self-assigned this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants