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

[RFR][v3] NumberInput - step needs to be passed in inputProps #3665

Merged
merged 1 commit into from
Sep 13, 2019
Merged

[RFR][v3] NumberInput - step needs to be passed in inputProps #3665

merged 1 commit into from
Sep 13, 2019

Conversation

natrim
Copy link
Contributor

@natrim natrim commented Sep 10, 2019

the new version of material-ui in v3 does not pass all props to native input

so the step needs to be passed in inputProps to work

@fzaninotto fzaninotto added this to the 3.0.0 milestone Sep 11, 2019
@fzaninotto
Copy link
Member

The mui documentation says otherwise (TextInput passes extra props to FormControl, which passes extra props to the native control). So either there is a bug on their side, or their documentation is false. Can you please open an issue on their tracker?

Also, for such PRs, a unit test showing the bug is necessary.

@natrim
Copy link
Contributor Author

natrim commented Sep 12, 2019

the documentation says:

TextField: "Any other props supplied will be provided to the root element (FormControl)."
FormControl: "Any other props supplied will be provided to the root element (native element)."

and it does, the step is passed to root native element, aka. root div of the FormControl
but we want the step passed to "input" and not root div

Snímek obrazovky 2019-09-12 v 8 18 55

@djhi
Copy link
Collaborator

djhi commented Sep 12, 2019

👍 @natrim
Can you add a test for it ?

so it is added to native input and not wrapping div
@natrim
Copy link
Contributor Author

natrim commented Sep 13, 2019

@dhji added the test

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fzaninotto fzaninotto merged commit 43af3a5 into marmelab:next Sep 13, 2019
@fzaninotto
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants