Skip to content

Adding items to autocomplete remove active item #16608

Open
@plchampigny

Description

@plchampigny

Reproduction

Here's a repro on stackblitz: https://stackblitz.com/edit/angular-i6q9p5

Steps to reproduce:

  1. Press on the select
  2. Change selection using keyboard down arrow
  3. My code adds 10 new items each 5 seconds so you should be able to reproduce my issue
  4. The view remove the selected active item and if you press down again when new items are there, the active item will start back from top

Expected Behavior

When adding new items, the panel should preserve the current active item and scroll (unless current item is not there anymore).

Actual Behavior

The view remove the selected active item and if you press down again when new items are there, the active item will start back from top

Environment

Angular CLI: 8.1.1
Node: 12.6.0
OS: win32 x64
Angular: 8.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package Version

@angular-devkit/architect 0.800.6
@angular-devkit/build-angular 0.801.1
@angular-devkit/build-optimizer 0.801.1
@angular-devkit/build-webpack 0.801.1
@angular-devkit/core 8.1.1
@angular-devkit/schematics 8.1.1
@angular/cdk 8.0.0
@angular/flex-layout 7.0.0-beta.23
@angular/material 8.0.2
@angular/material-moment-adapter 8.0.2
@ngtools/webpack 8.1.1
@schematics/angular 8.0.0
@schematics/update 0.801.1
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocomplete

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions