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

[Tabs] Update onChange docs to match types #15672

Merged
merged 2 commits into from
May 18, 2019
Merged

Conversation

jharrilim
Copy link
Contributor

Contributor Checklist

Summary

Changed the value from any to number to match the documentation at https://material-ui.com/api/tabs/

Changed the value from any to number to match the documentation at https://material-ui.com/api/tabs/
@mui-pr-bot
Copy link

mui-pr-bot commented May 13, 2019

No bundle size changes comparing 014a07f...fffd6f5

Generated by 🚫 dangerJS against fffd6f5

@jharrilim
Copy link
Contributor Author

Oh. If it is meant to be any, then should this be changed?

https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Tabs/Tabs.js#L462

@eps1lon
Copy link
Member

eps1lon commented May 14, 2019

The value has an unknown type at compile time (any is used for older code). TypeScript can't infer what possible types are passed. The linked docs only make a statement about the default behavior if no value is passed. If a value is passed then that one is used.

@oliviertassinari oliviertassinari added component: tabs This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation labels May 18, 2019
@eps1lon eps1lon merged commit 997a8b5 into mui:next May 18, 2019
@eps1lon eps1lon changed the title [Tabs] Update onChange signature to match docs [Tabs] Update onChange docs to match types May 18, 2019
@eps1lon
Copy link
Member

eps1lon commented May 18, 2019

@jharrilim Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants