-
-
Notifications
You must be signed in to change notification settings - Fork 380
Closed as not planned
Labels
type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.typescript
Description
Steps to reproduce 🕹
The following should work
// values accepts const and value has correct type
useAutocomplete({
options: ['1', '2', '3'] as const,
multiple: true,
value: ['1', '3'] as const,
onChange(event, value) {
expectType<ReadonlyArray<'1' | '2' | '3'>, typeof value>(value);
},
});Current behavior 😯
Typescript complains that the value is an immutable array.
Expected behavior 🤔
accept it.
Context 🔦
A fix was proposed in mui/material-ui#38253 and got merged, it got reverted in mui/material-ui#38253 because of mui/material-ui#38817.
The steps proposed by @mnajdova were to
- move the current useAutocomplete in Material UI
- iterate on the useAutocomplete in Base UI - test the changes in Joy UI
- in v6, migrate Material UI's Autocomplete to use the Base UI's useAutocomplete
Your environment 🌎
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.typescript