Skip to content

How to correctly extend Material-UI component with typescript #21166

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

Closed
2 tasks done
siriwatknp opened this issue May 24, 2020 · 2 comments
Closed
2 tasks done

How to correctly extend Material-UI component with typescript #21166

siriwatknp opened this issue May 24, 2020 · 2 comments
Labels
component: tabs This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists typescript

Comments

@siriwatknp
Copy link
Member

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

Current Behavior 😯

I want to extend material-ui components, ex. just want to wrap Tabs with more props but seems likeonChange type is not correct
https://codesandbox.io/s/zealous-agnesi-g5tqs?file=/src/App.tsx (scroll down and you will see error at onChange)

image

Expected Behavior 🤔

onChange should work

Steps to Reproduce 🕹

See the codesandbox link above

Tech Version
Material-UI v4.10.0
React
Browser
TypeScript 3+
etc.
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work typescript component: tabs This is the name of the generic UI component, not the React module! labels May 24, 2020
@oliviertassinari
Copy link
Member

I think that it's the same bug as #20191 but for the Tabs component.

@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed bug 🐛 Something doesn't work typescript labels Jun 23, 2020
@oliviertassinari
Copy link
Member

Duplicate of #17454

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! duplicate This issue or pull request already exists typescript
Projects
None yet
Development

No branches or pull requests

2 participants