Skip to content

[BUG] Highlight color disappears on search when first option does not change #452

@melcor76

Description

@melcor76

Describe the bug
When we filter the first option (or the selected one) gets highlighted.
But when narrowing down the search and the first option is the same then the highlight disappears.
I can see that the class mat-mdc-option-active is not there as it should be.

To Reproduce

  1. Go to https://stackblitz.com/github/bithost-gmbh/ngx-mat-select-search-example
  2. Click on one of the select lists, for example, "Single selection with custom clear icon"
  3. Start writing f..r..a
  4. See error --> The first option is not highlighted

Expected behavior
I expect the first option to be highlighted.

Screenshots
image

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome
  • Version: 121.0.6167.139

Additional context
The first option is still active in the sense that when I use the arrow key down then it goes to the 2nd option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions