Skip to content

docs(material): add autocomplete loading example - #33720

Open
hadt0786 wants to merge 1 commit into
angular:mainfrom
hadt0786:docs-18478-autocomplete-loading-example
Open

docs(material): add autocomplete loading example#33720
hadt0786 wants to merge 1 commit into
angular:mainfrom
hadt0786:docs-18478-autocomplete-loading-example

Conversation

@hadt0786

Copy link
Copy Markdown

docs(material): add autocomplete loading example

@pullapprove
pullapprove Bot requested review from andrewseguin and crisbeto August 23, 2026 13:33
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Aug 23, 2026
@hadt0786
hadt0786 marked this pull request as draft August 23, 2026 13:40
@hadt0786
hadt0786 marked this pull request as ready for review August 23, 2026 13:40
@hadt0786

Copy link
Copy Markdown
Author

Summary

  • add an asynchronous autocomplete example with a visible loading state
  • show a disabled "No results found" option when the search completes without matches
  • use switchMap to cancel stale searches and finalize to clear loading state
  • document the pattern without changing the MatAutocomplete API

Fixes #18478

Testing

  • documentation/example-only change; CI will validate the example and docs build

@hadt0786
hadt0786 force-pushed the docs-18478-autocomplete-loading-example branch from 151ccff to 263ce62 Compare August 26, 2026 19:03
@hadt0786
hadt0786 requested a review from crisbeto August 27, 2026 16:53
@hadt0786

Copy link
Copy Markdown
Author

Addressed the review feedback in the latest commit: loading and empty states are now rendered outside mat-option using an aria-live="polite" hint, while mat-option is reserved for selectable results. The autocomplete docs were updated to describe the same pattern. google-internal-tests is passing on the current head.

Document asynchronous autocomplete loading and empty states using signals and non-interactive status text.
@hadt0786
hadt0786 force-pushed the docs-18478-autocomplete-loading-example branch from 90a01b3 to 6701817 Compare August 28, 2026 12:20
@hadt0786
hadt0786 requested a review from michael-small August 28, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants