I am trying to add a search button my Autocomplete Component on Material UI. So far I have been able to add the button however, it always appears before the clear button like below:
How can I set the InputProps such that the button will appear after the X.
So far I have:
<Autocomplete
id="search-input"
freeSolo
renderInput={(params) => (
<TextField
{...params}
placeholder={`...`}
margin="normal"
variant="outlined"
size="medium"
InputProps={{
...params.InputProps,
endAdornment: (
<React.Fragment>
<IconButton size="small">
<SearchIcon />
</IconButton>
{params.InputProps.endAdornment}
</React.Fragment>
),
}}
/>
)}
/>
I have tried replacing the order of ...params.InputProps and the endAdornment but nothing changes.

