Skip to content

[Autocomplete] Readonly Array value#47948

Open
filipomar wants to merge 2 commits intomui:masterfrom
filipomar:readonly-autocomplete
Open

[Autocomplete] Readonly Array value#47948
filipomar wants to merge 2 commits intomui:masterfrom
filipomar:readonly-autocomplete

Conversation

@filipomar
Copy link

@filipomar filipomar commented Mar 11, 2026

This PR updates the types of the AutoComplete component and hook so readonly arrays values can be passed.

I went through the component and attempted to narrow the types of any other function consuming the value.

@mui-bot
Copy link

mui-bot commented Mar 11, 2026

Netlify deploy preview

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

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 935f0c0

@filipomar filipomar force-pushed the readonly-autocomplete branch 3 times, most recently from bbaed45 to 842cbc8 Compare March 11, 2026 14:36
@filipomar filipomar changed the title [AutoComplete] Correcting values type [AutoComplete] Readonly Array value Mar 11, 2026
@filipomar filipomar force-pushed the readonly-autocomplete branch from 842cbc8 to f794676 Compare March 11, 2026 14:52
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 11, 2026
@filipomar filipomar marked this pull request as ready for review March 11, 2026 15:03
@filipomar filipomar force-pushed the readonly-autocomplete branch from f794676 to f42e38d Compare March 11, 2026 15:14
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 11, 2026
@filipomar filipomar force-pushed the readonly-autocomplete branch 2 times, most recently from f98e035 to 05865a4 Compare March 11, 2026 15:29
@zannager zannager added the scope: autocomplete Changes related to the autocomplete. This includes ComboBox. label Mar 12, 2026
@zannager zannager requested a review from ZeeshanTamboli March 12, 2026 13:57
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 13, 2026
@filipomar filipomar force-pushed the readonly-autocomplete branch from 05865a4 to f17ca27 Compare March 17, 2026 12:59
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Mar 17, 2026
@filipomar filipomar force-pushed the readonly-autocomplete branch from f17ca27 to 56a4426 Compare March 17, 2026 13:07
@filipomar
Copy link
Author

Not sure if the deployment failure is something that I introduced.

Could it be an issue on something I added?

@mj12albert
Copy link
Member

@filipomar Is it important for your use-case that the value in the change handlers are also readonly arrays? Asking because it's a breaking change, but wouldn't be breaking if we only changed the input to also accept readonly array

@ZeeshanTamboli ZeeshanTamboli changed the title [AutoComplete] Readonly Array value [Autocomplete] Readonly Array value Mar 19, 2026
@filipomar
Copy link
Author

Is it important for your use-case that the value in the change handlers are also readonly arrays? Asking because it's a breaking change, but wouldn't be breaking if we only changed the input to also accept readonly array

Actually it is not.
This is a side effect of me trying to change as little code as I could (in order to get it passed).

With all of that being said, if I am able to make the input readonly but the callbacks type not, (hopefully) without completely refactoring everything, would that be ok? Or do you forsee other issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: autocomplete Changes related to the autocomplete. This includes ComboBox. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants