Skip to content

[Autocomplete] Allow the user to remove the textarea warning #41669

Open
@adriancuadrado

Description

@adriancuadrado

Summary

I want to be able to remove this warning:

A textarea element was provided to Autocomplete where input was expected.
This is not a supported scenario but it may work under certain conditions.
A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).
Make sure to test keyboard navigation and add custom event handlers if necessary.

In React, when you add the contentEditable, you get a warning in the console that warns you about the problems you might encounter using that prop. To remove that warning you have to add another prop: suppressContentEditableWarning.

I want something similar to remove the textarea warning. Ideally, the warning message itself should also tell you about this new prop to remove it.

Examples

<Autocomplete
  options={yourOptions}
  renderInput={(params) => <TextField {...params} multiline />}
  suppressTextareaWarning
/>

Motivation

#29961

Search keywords: remove textarea warning autocomplete

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: autocompleteThis is the name of the generic UI component, not the React module!dxRelated to developers' experiencepackage: material-uiSpecific to @mui/materialready to takeHelp wanted. Guidance available. There is a high chance the change will be accepted

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions