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

[material-ui][Autocomplete] Sync runtime and TS types for key in grouped options #44862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aarongarciah
Copy link
Member

@aarongarciah aarongarciah commented Dec 26, 2024

Closes #44818

key in AutocompleteRenderGroupParams has string type whereas key in AutocompleteGroupedOption has number. This PR updates the key in AutocompleteRenderGroupParams to also be number.

We could also use string in both and cast the key to be string in https://github.com/mui/material-ui/blob/v6.3.0/packages/mui-material/src/useAutocomplete/useAutocomplete.js#L1053

@aarongarciah aarongarciah added package: material-ui Specific to @mui/material component: autocomplete This is the name of the generic UI component, not the React module! labels Dec 26, 2024
@aarongarciah aarongarciah changed the title [material-ui][Autocomplete] Sync key runtime type with TS on grouped options [material-ui][Autocomplete] Sync runtime and TS types for key in grouped options Dec 26, 2024
@aarongarciah aarongarciah self-assigned this Dec 26, 2024
@mui-bot
Copy link

mui-bot commented Dec 26, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against a6c3716

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

@aarongarciah do I understand this correctly?

Is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Autocomplete] Typization mistake in AutocompleteRenderGroupParams
3 participants