Is there a way for Material-UI to adjust the width of the TextField element automatically based on the input text?
When creating a form view/edit page and rendering data into fields, I also have parameters set by the server. It would be convenient to have the disabled form elements automatically adjust their width.
I've tried adjusting the width of both the TextField and Input components without success. One option could be counting the characters in the field and setting the width with JavaScript, but I prefer a CSS solution.
<TextField
disabled={true}
label={"UUID"}
value={"7be093a5647d41ff8d958928b63d11f5"}
style={{width: "auto"}}
InputProps={{
style: {width: "100%"}
}}
/>