angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.37k stars 6.75k forks source link

bug(mat-autocomplete): missing selection indicator (highlight + check icon) when using mat-autocomplete with mat-optgroup #29189

Open poveu opened 5 months ago

poveu commented 5 months ago

Is this a regression?

The previous version in which this bug was not present was

14

Description

v15 introduced an indicator of the currently selected item: image However, this indicator is missing when, instead of flat mat-options, we're using mat-optgroup with mat-options: image

Reproduction

The repro is even in the official documentation of any version higher than v14: https://v15.material.angular.io/components/autocomplete/examples

Expected Behavior

We should see the indicator of a selected item even when we're using mat-optgroup

Actual Behavior

Missing selection indicator when using mat-autocomplete with mat-optgroup

Environment

amysorto commented 5 months ago

Tested in v18, also still occurs