Skip to content

Conversation

@AarishMansur
Copy link
Contributor

@AarishMansur AarishMansur commented Jan 22, 2026

Problem

AutocompleteInput supports the renderInput prop at runtime via the underlying MUI Autocomplete component, but this prop is not exposed in the TypeScript definition of AutocompleteInputProps
As a result, TypeScript users cannot pass renderInput without losing type safety or relying on implicit typing.

Closes #10430

Solution

This PR exposes the renderInput prop in the AutocompleteInput TypeScript interface by reusing the corresponding type from MUI’s AutocompleteProps
There is no runtime behavior change this only aligns the TypeScript definition with the existing supported API.

How To Test

  1. Use AutocompleteInput with a renderInput prop in a TypeScript project.

  2. Verify that TypeScript does not report any type errors.

  3. Run the test suite (yarn test) to ensure no regressions are introduced.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests ((not applicable typeScript only change with no runtime behavior)
  • The PR includes one or several stories (not applicable no UI or behavioral change)
  • The documentation is up to date(not required this prop was already supported at runtime)

Also, please make sure to read the contributing guidelines.

@fzaninotto
Copy link
Member

I notice that the props already extend MUI's AutocompleteProps, specifically omitting renderInput. I wonder why this is, and I also wonder if a better fix wouldn't be of removing this prop from the omit array.

@fzaninotto
Copy link
Member

No wait, I know: we don't want to support overriding the renderInput prop, as this is the heart of react-admin's AutocompleteInput. If you need a specific renderInput, I believe you should build your own AutocompleteInput.

Can you expain your use case to determine if it's something we want to support?

@slax57
Copy link
Contributor

slax57 commented Jan 23, 2026

@fzaninotto It's to support the use-case described in #10430

@AarishMansur please mention the issue you are addressing when opening a PR, it helps with traceability.

@AarishMansur
Copy link
Contributor Author

AarishMansur commented Jan 23, 2026

@fzaninotto

This PR is meant to support the use case described in #10430, where grouping is required and the selected option needs a richer visual representation.

@fzaninotto
Copy link
Member

Understood, thanks for the feedback. I still think the correct implementation should be to remove the renderInput key from the Omit type instead of re-adding it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants