Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing inputRef to TextFieldsProps breaks MuiOtpInput #71

Closed
sadik-malik opened this issue Nov 2, 2024 · 0 comments
Closed

Passing inputRef to TextFieldsProps breaks MuiOtpInput #71

sadik-malik opened this issue Nov 2, 2024 · 0 comments

Comments

@sadik-malik
Copy link

When using the MuiOtpInput component and passing an inputRef within TextFieldsProps, the component breaks, the component doesn't accept input anymore. This appears to be due to an incompatibility with how inputRef is handled in the underlying TextField.

Steps to Reproduce:

  1. Import and use the MuiOtpInput component.
  2. Pass an inputRef through the TextFieldsProps to control the input programmatically.
  3. Type anything from keyboard, the TextField component will not accept input anymore.

Expected Behavior:
Passing an inputRef to TextFieldsProps should allow for standard usage and programmatic control without breaking the MuiOtpInput component.

Possible Solutions:
Adding a fork ref behaviour to the component should fix the issue.

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

No branches or pull requests

1 participant