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

[Autocomplete] Support ChipComponent type #37112

Merged
merged 9 commits into from May 9, 2023

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented May 1, 2023

fixes #33788

before: https://codesandbox.io/s/tender-sun-04j5wj?file=/src/CustomAutocomplete.tsx
after: https://codesandbox.io/s/upbeat-bhaskara-66yqp6?file=/src/CustomAutocomplete.tsx

obeserve typescript error in line 91 in before sandbox, that error is fixed in after sandbox

@sai6855 sai6855 added bug 🐛 Something doesn't work typescript package: material-ui Specific to @mui/material component: autocomplete This is the name of the generic UI component, not the React module! labels May 1, 2023
@mui-bot
Copy link

mui-bot commented May 1, 2023

Netlify deploy preview

https://deploy-preview-37112--material-ui.netlify.app/

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against 99c9c59

@@ -293,4 +293,5 @@ export default function Autocomplete<
Multiple extends boolean | undefined = false,
DisableClearable extends boolean | undefined = false,
FreeSolo extends boolean | undefined = false,
>(props: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element;
ChipComponent extends React.ElementType = 'div',
Copy link
Member

Choose a reason for hiding this comment

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

It should be:

Suggested change
ChipComponent extends React.ElementType = 'div',
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],

Same in tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed

@ZeeshanTamboli
Copy link
Member

It also fixes #33788

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Looks good!

@ZeeshanTamboli ZeeshanTamboli merged commit 46cc4d2 into mui:master May 9, 2023
17 checks passed
binh1298 pushed a commit to binh1298/material-ui that referenced this pull request May 17, 2023
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocomplete typings don't support wrapper components
3 participants