According to the demonstration, the position of the label for a Material UI outlined select input should be at the top border of the select box.
https://i.sstatic.net/ue2ve.png
However, in my application, it seems like the z-index
of the label is causing it to appear behind the top border, creating a visual line cutting through the label.
https://i.sstatic.net/QoUCV.png
I have closely followed the code provided in the documentation and do not have any conflicting styles affecting this input element. After comparing the styles in the debugger tool with what's in the documentation, I couldn't identify any issues with my CSS files overriding the default styles.
Any suggestions on what might be causing this issue?
Below is the source code used:
<FormControl variant='outlined' style={{ width: '100%' }} margin={'1'}>
<InputLabel id='test-select-label'>Label</InputLabel>
<Select
labelId='test-select-label'
id='test-select'
value={'test1'}
onChange={e => setTest(e.target.value)}
size='small'
>
<MenuItem key={1} value={'test'} >Test 1</MenuItem>
<MenuItem key={2} value={'test2'} >Test 2</MenuItem>
</Select>
</FormControl>