-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Description
Steps to reproduce
- Open this live example: https://stackblitz.com/edit/github-tuzwikp?file=src%2FApp.tsx
- In the Autocomplete, first select the option “the shawshank redemption”.
- Then type “the” into the input and press Enter.
Result: the previously added chip (“the shawshank redemption”) becomes deselected, and only the substring (“the”) is left in the input.
Current behavior
In freeSolo + multiple mode, typing a value that is a substring of an existing option causes the previously created chip to be deselected. The input keeps only the new substring instead of preserving the chip.
Expected behavior
Both chips should be created independently since freeSolo is enabled.
Adding a substring should not remove or deselect the previously added chip.
This issue appears specifically when a shorter substring is added after a longer string.
Context
This issue breaks the expected freeSolo behavior, where every typed value—regardless of whether it matches or partially matches an existing option—should result in a new chip.
Users who type multiple related values (e.g., substrings, tags, or keywords) will lose their previous selections, making the component behave unpredictably.
This affects Autocomplete in real-world tagging or categorization UIs where freeSolo and multiple modes are commonly used together.
Your environment
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords: autocomplete freesolo multiple substring chip removed deselect input typing option existingvalue