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

Is there a backstory behind minLength not passing through to <input>? #155

Open
tony opened this issue Jul 7, 2022 · 2 comments
Open

Is there a backstory behind minLength not passing through to <input>? #155

tony opened this issue Jul 7, 2022 · 2 comments

Comments

@tony
Copy link

tony commented Jul 7, 2022

Is it by design that minLength doesn't pass through to <input>?

TypeScript: lib.dom.ts for HTMLInputElement
HTML: minlength for HTMLInputElement on MDN

My supposition is that in React minLength (react) -> minlength (HTML)

Sandbox: https://codesandbox.io/s/react-18-playground-react-debounce-input-case-8pln0b?file=/src/index.tsx

@nkbt
Copy link
Owner

nkbt commented Jul 7, 2022

Yeah minLength is used internally because I tried to make component a drop in replacement.

The main issue is that underlying component does not have to be an input. Could be a textarea or anything else. And it does not support minLength attribute and will throw warning about it.

@tony
Copy link
Author

tony commented Jul 7, 2022

@nkbt Suggestion for what we do next? Should we consider this closed as a wontfix since the underlying component is unknown? Is there an approach for a PR potentially?

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

2 participants