Autocomplete + textfield leads to the label overlapping #44798
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
component: text field
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for author
Issue with insufficient information
Steps to reproduce
Steps:
Current behavior
Expected behavior
Context
I'm writing a medication picker using react-hook-forms with autocomplete boxes for a few fields. Each row is a flex box with a column layout, inside are a bunch of fields. Three of those fields are Autocomplete boxes similar to the one I've pasted below.
The label is positioned incorrectly for all three, but only in my production environment. It's most obvious when there's no valid value, but even when there is, the label is still too close to the text.
I'm using vite to build, I do not know what would be different between
vite
andvite build
that would impact this.I can hack around this by adding:
After which it's approximately right in chrome in both the populated and empty states.
I can try and work on a reproducible demo later, I suspect it's going to be a challenge :/. If anyone has any ideas on things I can try please let me know.
Your environment
npx @mui/envinfo
Search keywords: autocomplete label textfield overlap position
The text was updated successfully, but these errors were encountered: