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

Add maxLength type for material ui text field #18345

Merged
merged 2 commits into from Aug 2, 2017
Merged

Add maxLength type for material ui text field #18345

merged 2 commits into from Aug 2, 2017

Conversation

ospfranco
Copy link

Added a one more prop type for material-ui TextField component, it appears it is not well documented, but I have tested it and it is working.

Link to original issue on github mui/material-ui#1578.

@dt-bot
Copy link
Member

dt-bot commented Jul 24, 2017

types/material-ui/index.d.ts

to authors (@ngbrown @theigor @alitaheri @herrmanno @DaIgeb @allienna @schlesingermatthias @InsidersByte @artyomsv). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 1, 2017

Approved by a listed owner. PR appears ready to merge pending express review by a maintainer.

@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Aug 1, 2017
@@ -1846,6 +1846,7 @@ declare namespace __MaterialUI {
autoFocus?: boolean;
min?: number;
max?: number;
maxLength?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're referring to HTML input's maxlength, Please note that it's not maxLength it's maxlength. Also, please add minlength too.

@typescript-bot
Copy link
Contributor

@ospfranco Please address comments from the code reviewers.

@typescript-bot typescript-bot removed this from Merge: YSYL in Pull Request Triage Backlog Aug 2, 2017
@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Unmerged The author did not merge the PR when it was ready. labels Aug 2, 2017
@ospfranco
Copy link
Author

@alitaheri this is not HTML tag property, but material UI internal property, I have not tested minLength functionality, only the maxLength as described here: mui/material-ui#1578

@alitaheri
Copy link
Contributor

@ospfranco That's because it's not case-sensitive. Also it's not an internal prop as you can't see it used in the code other than being passed directly to input.

Although maxLength will work the standard name is maxlength.

Please rename to maxlength and add minlength too. Thank you.

@ospfranco
Copy link
Author

@alitaheri You are right, sorry I did not thoroughly check the source code, I've included the requested changes! thanks!

@typescript-bot typescript-bot added Author Approved and removed Revision needed This PR needs code changes before it can be merged. labels Aug 2, 2017
@sheetalkamat sheetalkamat merged commit 8a10ec0 into DefinitelyTyped:master Aug 2, 2017
milosdanilov pushed a commit to milosdanilov/DefinitelyTyped that referenced this pull request Aug 5, 2017
* Add maxLength type for material ui text field

* Add minlength property and change maxLength to lowercase only
@typescript-bot typescript-bot removed this from Merge: Express in Pull Request Triage Backlog Sep 14, 2017
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.

None yet

5 participants