Skip to content

Fix(AutocompleteInput): do not open autocomplete options when shouldRenderSuggestions returns false#11263

Merged
fzaninotto merged 2 commits into
masterfrom
fix/3166-autocomplete-suggestions
May 18, 2026
Merged

Fix(AutocompleteInput): do not open autocomplete options when shouldRenderSuggestions returns false#11263
fzaninotto merged 2 commits into
masterfrom
fix/3166-autocomplete-suggestions

Conversation

@jonathanarnault
Copy link
Copy Markdown
Contributor

Problem

The suggestions ("No options"/"Please wait") keep appearing despite the char count is not firing the request when AutocompleteInput is inside a ReferenceInput

Solution

Use controlled mode in Autocomplete for AutocompleteInput to avoid opening the choces when there are no options to render

How To Test

  1. make storybook
  2. Then go to http://localhost:9010/?path=/story/ra-ui-materialui-input-autocompleteinput--inside-reference-input-with-should-render-suggestions

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@jonathanarnault jonathanarnault added the RFR Ready For Review label May 18, 2026
@fzaninotto fzaninotto merged commit 6e0c663 into master May 18, 2026
15 checks passed
@fzaninotto fzaninotto deleted the fix/3166-autocomplete-suggestions branch May 18, 2026 13:04
@fzaninotto fzaninotto added this to the 5.14.7 milestone May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants