The current autocomplete element doesn't allow controlling the text field's end adornment:
|
input: { |
|
...params.slotProps.input, |
|
...textFieldProps?.slotProps?.input, |
|
endAdornment: ( |
|
<> |
|
{loading ? loadingElement : null} |
|
{params.slotProps.input.endAdornment} |
|
</> |
|
), |
|
}, |
(params is passed from mui, no way to control its value from what I can tell)
Would you accept a PR to change the above to something like:
input: {
...params.slotProps.input,
...textFieldProps?.slotProps?.input,
endAdornment: (
<>
{textFieldProps?.slotProps?.input?.endAdornment ? textFieldProps?.slotProps?.input?.endAdornment : loading ? loadingElement : null}
{params.slotProps.input.endAdornment}
</>
),
},
The current autocomplete element doesn't allow controlling the text field's end adornment:
react-hook-form-mui/packages/rhf-mui/src/AutocompleteElement.tsx
Lines 348 to 357 in b19c844
(
paramsis passed from mui, no way to control its value from what I can tell)Would you accept a PR to change the above to something like: