Questions & Answers

how to display MUI Select selected option different from how the MenuItem are displayed

Trying to seperate how the MUI label value is displayed from the selection list items.

when a value is selected: select is displayed like this: enter image description here

When the select input is clicked, the list is: enter image description here

now I want to to change the default display of when an item is selected: 1st image. to simply display a label. I don't want to be based on : the button should not be displayed. I don't know how to do this, searched and couldn't find a solution.

the code:

<FormControl ...>
        <InputLabel htmlFor = "select-device-group">
            Device Group
            value = {props.deviceGroup.selected} label={}
            onChange = {props.selectDeviceGroup}
            input = {<Input id = "select-device-group"/>}>
            { => {
                return <MenuItem key = {} value = {device} component='div'>
                    <div className='container p-0'>
                        <div className='row'>
                            <div className='col align-self-center'>
                            <div className='col'>
                        title = {}
                        onClick = {...}
            <span ...>
              <SVG .../>
2023-01-17 00:47:30
So you don't want to show the Select button once the user selects one option. And you want to show the selected option as a label? Is that right?
Answers(0) :