Open rubber-duck-software opened 2 years ago
The issue already exists https://github.com/mui/material-ui/issues/33195
First of all, a very rare use case where you need the label as an input. Also, it's not an exact duplicate of #33195 but the logic to solve that could solve this as well. I also noticed that it is possible to select the input in the Autocomplete by Tab
key, so is it something to do with some z-index value?
Duplicates
Latest version
Current behavior 😯
The label for a TextField can be any ReactNode. However if the label is an and the TextField is used in renderInput for Autocomplete, then the element cannot be focused.
Expected behavior 🤔
An input used as a label for a TextField should be focusable, even when used inside of AutoComplete renderInput.
Steps to reproduce 🕹
Steps:
Context 🔦
Working on an Application where the label for fields should be editable by admin users. In my app, when the user clicks an icon, the label should become editable. This is working for all fields except for AutoCompletes, where the label input cannot be focused.
Your environment 🌎
StackBlitz https://stackblitz.com/edit/react-ts-wuuatm?file=App.tsx