I'm using React and Material UI to make a web application. I'm using Select to build a multi-select component. It's working OK. See the code that follows.
export const AvailableStations = () => {
const [personName, setPersonName] = React.useState([]);
const handleChangeMultiple = (event) => {
const { options } = event.target;
const value = [];
for (let i = 0, l = options.length; i < l; i += 1) {
if (options[i].selected) {
value.push(options[i].value);
}
}
setPersonName(value);
};
return (
<div>
<Box textAlign='center'>
<FormControl sx={{ m: 0}}>
<InputLabel m={1} shrink htmlFor="select-multiple-native">
Native
</InputLabel>
<Select sx={{minWidth: 170, maxWidth: 170}}
multiple
native
value={personName}
// @ts-ignore Typings are not considering `native`
onChange={handleChangeMultiple}
label="Native"
inputProps={{
id: 'select-multiple-native',
}}
>
{names.map((name) => (
<option key={name} value={name}>
{name}
</option>
))}
</Select>
</FormControl>
</Box>
</div>
);
}
The problem is that the Select content is overlapping the InputLabel. See the image that follows.

Can anyone help me to include a separation between them?
