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

[doc] Add explicit types for slider callbacks #19867

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

deymundson
Copy link
Contributor

@deymundson deymundson commented Feb 26, 2020

Closes #19739

When adding the number | number[] type to the param in Slider.js I discovered that union types and array types were not yet supported by the documentation generator, so I added some basic support for those types. The union type was straight-forward, although it required some recursive handling. The support I added for array types is quite brittle, but I think given the context in which this code is used it would be reasonable to add more sophisticated support when / if it is needed.

There are a couple spurious changes to the API doc, though looking at the diff it looks like some fixes to latent issues.

P.S. This is the first pull request I submitted for open source development, so if there's anything I can improve / should do / should not do, please let me know!

@mui-pr-bot
Copy link

No bundle size changes comparing 49e1adf...a354333

Generated by 🚫 dangerJS against a354333

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Oh wow I think I had this planned for one of my earlier PRs but never found a use case.

@eps1lon eps1lon added docs Improvements or additions to the documentation new feature New feature or request labels Feb 26, 2020
@eps1lon eps1lon merged commit 436e461 into mui:master Feb 26, 2020
@eps1lon
Copy link
Member

eps1lon commented Feb 26, 2020

@deymundson Great work! Thanks.

EsoterikStare pushed a commit to EsoterikStare/material-ui that referenced this pull request Mar 30, 2020
@oliviertassinari oliviertassinari added the component: slider This is the name of the generic UI component, not the React module! label Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: slider This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants