Autocomplete with multiline textfield logs error
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
When having a multiline textfield inside autocomplete, it logs an error (only in non-production):
MUI: Unable to find the input element. It was resolved to [object HTMLTextAreaElement] while an HTMLInputElement was expected.
Instead, Autocomplete expects an input element.
Make sure you have customized the input component correctly.
However aside the error log, it works as expected.
Expected behavior 🤔
Having a multiline textfield inside autocomplete, should not log an error.
Steps to reproduce 🕹
Steps:
- Have a multiline textfield inside renderInput of autocomplete
- Check console
https://codesandbox.io/s/autocomplete-textfield-multiline-error-33l8w?file=/src/App.js
Context 🔦
I need to have a autocomplete with a textfield that supports multiline. The error seems to come from this check, however I don’t really get why a Textarea is not supported.
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:12 (9 by maintainers)
Top Results From Across the Web
c# - textbox auto complete (Multi Line) - Stack Overflow
AutoCompleteSource does not work on multiline TextBox controls. Wich means you need to make it from scratch: I would make a ListBox to...
Read more >Autocomplete - How to use the textarea element instead of the ...
The input HTML element can't display a multiline text string so dxAutocomplete can't be multiline.
Read more >Autocomplete Widget - jQuery UI API Documentation
Any field that can receive input can be converted into an Autocomplete, namely, <input> elements, <textarea> elements, and elements with the contenteditable ...
Read more >The Textarea element - HTML: HyperText Markup Language
The HTML element represents a multi-line plain-text editing control, ... If the autocomplete attribute is not specified on a <textarea> ...
Read more >TextField - Shopify.dev
error ? string, An error label to present with the field. multiline? boolean, Whether the field supports multiple lines of input. autocomplete?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s no way to remove it in dev mode. It doesn’t show up in the production build.
New to open source and looking to pick up an issue. Is this one currently being worked on?