Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Material UI Element css not working, why?

enter image description here

What could be going wrong for the css to not be working(The top bar – heading overlap)?

here is the component:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<FormControl fullWidth>
                            {/* eslint-disable-next-line */}
                            <InputLabel id="simple-select-label">GT Template</InputLabel>
                            <Select labelId="simple-select-label" id="demo-simple-select-label" onChange={handleChange} value={gtTemplate}>
                                <MenuItem value="employee/addemployeeimport">Add Employee Importer</MenuItem>
                                <MenuItem value="lop-days">Employee LOP</MenuItem>
                                <MenuItem value="lop-reversal">LOP Reversal Importer</MenuItem>
                                <MenuItem value="employee/bankdetails">Employee Bank Details</MenuItem>
                                <MenuItem value="loan-detail">Employee Loan Details</MenuItem>
                                <MenuItem value="employee/employeecategory">Employee Category</MenuItem>
                                <MenuItem value="resignation">Employee Resignation</MenuItem>
                                
                            </Select>
                        </FormControl>

>Solution :

You need to add label attribute to the Select element

<Select labelId="simple-select-label" id="demo-simple-select-label" onChange={handleChange} value={gtTemplate} label="GT Template">

And this may be usefull too https://mui.com/material-ui/react-select/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading