Skip to content

Autocomplete TextField endAdornment #420

Description

@rynoV

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}
                  </>
                ),
              },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions