While working on my initial Material UI project, I encountered a responsiveness issue with TextField and SelectField.
During development, the application looked fine at a screen width of 1920px. However, when I attempted to decrease the screen width, I noticed that TextField and SelectField components were expanding and appearing strangely large on the screen.
Screen at 1920x- https://i.sstatic.net/0yNxw.png
Screen at 1423px https://i.sstatic.net/6VW5w.png
Screen at 1024px https://i.sstatic.net/cMw7z.png
At a width of 1024px, the form was taking up almost the entire screen. My goal is to adjust the height and width of textField based on the screen resolution.
Similar to applying CSS media queries in standard bootstrap forms, I am looking for a way to achieve this functionality. Can anyone provide guidance?
I have created a sample App on code sandbox -- you can access it through the following link:
https://codesandbox.io/s/jrzq2m?file=/ResponsiveForm.jsx or
Note: I have been using ctrl++ and ctrl+- to adjust the resolution, as well as experimenting with Chrome's inspect element for mobile responsiveness.