angular / angular/components

virtual-scroll inside mat-select new values not visible & big space

オープン
#13,087 コメント 19 件 リアクション 14 件 担当者 0 名 GitHub で見る
area: cdk/scrolling area: material/form-field area: material/select P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Bug, feature request, or proposal:

Bug

#### What is the expected behavior?

`cdk-virtual-scroll-viewport` inside a mat-select or mat-autocomplete should align with the overlay panel.

```




{{state}}


```

#### What is the current behavior?

When scrolled `cdkVirtualFor` does not seem to add more elements and moreover shows a big space from last element of the initial set of items to the end.

#### What are the steps to reproduce?

https://stackblitz.com/edit/angular-h4xptu-dgjd87?file=app/select-reset-example.html

#### What is the use-case or motivation for changing an existing behavior?

* Occasionally I run into scenarios where the items in the list are too many and makes the page unresponsive.

* Seem-less integration of cdk-virtual-scroll-viewport with other components.

* mat-select essentially can handle any number of elements when this works.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

```
Angular CLI: 6.1.5
Node: 10.0.0
OS: win32 x64
Angular: 6.1.4
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router

Package Version
------------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-ng-packagr 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 0.7.5
@angular/cdk 6.4.7
@angular/cdk-experimental 6.4.7
@angular/cli 6.1.5
@angular/compiler-cli 6.1.7
@angular/flex-layout 6.0.0-beta.17
@angular/language-service 6.1.7
@angular/material 6.4.7
@ngtools/webpack 6.1.5
@schematics/angular 0.7.5
@schematics/update 0.7.5
rxjs 6.2.2
typescript 2.9.2
webpack 4.9.2
```

#### Is there anything else we should know?

Great work

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現コード、特に app/select-reset-example.html から始め、cdk-virtual-scroll-viewport が mat-select または mat-autocomplete にどのようにネストされているかを確認してください。スクロール中に項目が欠落する問題と余分なスペースを再現し、その後、overlay と virtual scroll の相互作用を追跡してください。新たにスクロールして表示された値が現れ、viewport が overlay パネルと揃えば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。