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

TextField InputProps lang attribute isn't applied #21486

Closed
2 tasks done
teggno opened this issue Jun 17, 2020 · 2 comments
Closed
2 tasks done

TextField InputProps lang attribute isn't applied #21486

teggno opened this issue Jun 17, 2020 · 2 comments
Labels
component: text field This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@teggno
Copy link

teggno commented Jun 17, 2020

When writing<TextField InputProps={{ lang: "en"}}>..., the lang attribute doesn't get applied to the <input> in the DOM. Instead it gets applied to input's parent <div>

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When writing<TextField InputProps={{ lang: "en" }}>..., the lang attribute doesn't get applied to the <input> in the DOM. Instead it gets applied to input's parent <div>

Expected Behavior 🤔

The resulting DOM should be <input lang="en">

Context 🔦

I want to specify the language the text will be entered in a component that is intended for translation.

Your Environment 🌎

Tech Version
Material-UI v4.10.1
React v16.9.35
Browser Firefox 76.0.1
TypeScript 3.9.3
@teggno teggno added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 17, 2020
@teggno
Copy link
Author

teggno commented Jun 17, 2020

Ok, found that I had to use inputProps not InputProps (mind the lower case "i").

@teggno teggno closed this as completed Jun 17, 2020
@oliviertassinari
Copy link
Member

Linking #11377.

@oliviertassinari oliviertassinari added component: text field This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants