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

use of min/max and endAdornment in InputProps #16952

Closed
coch110149 opened this issue Aug 9, 2019 · 2 comments
Closed

use of min/max and endAdornment in InputProps #16952

coch110149 opened this issue Aug 9, 2019 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@coch110149
Copy link

for the Textbox component it appears you have to use "inputProps" to use the max and min properties on a numeric type, but to have the InputAdornment you have to use "InputProps". This is both confusing to reading the code, and also eslint does not like duplicate props for a component

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

Current Behavior 😯

To use the min and max properties you have to declare it in "inputProps" and to use adornments you have to use "InputProps" or else they will not work. Currently eslint throws a warning about no duplicated props.

Expected Behavior 🤔

should not be two props with the same name (ignoring capitalization)

Steps to Reproduce 🕹

https://codesandbox.io/embed/material-demo-3kqy3

Steps:

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.?.?
React
Browser
TypeScript
etc.
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 9, 2019

@coch110149 This concern has been explored in the past. #14580 is the most up-to-date effort. It's a non-trivial problem. You can find more related issues in #11377 (comment).

@oliviertassinari oliviertassinari added component: text field This is the name of the generic UI component, not the React module! priority: important This change can make a difference labels Aug 9, 2019
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed component: text field This is the name of the generic UI component, not the React module! priority: important This change can make a difference labels Aug 31, 2019
@oliviertassinari
Copy link
Member

I'm closing for #11377.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants