bug(VirtualScroll): Horizontal scrolling inside cdk-virtual-scroll-viewport
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
Content inside the cdk-virtual-scroll-viewport does use more than 100% width and does not break anymore and instead adds horizontal scrolling.
This is especially a problem when using following css rules:
```
white-space: nowrap;
overflow: hidden;
```
The problem is the created wrapper container with the `cdk-virtual-scroll-content-wrapper` class that has a `min-width: 100%` set but no `max-width` and can not be changed because of the view encapsulation.
### Reproduction
https://github.com/DaniLopes2003/VirtualScroll-DemoApp
### Expected Behavior
No horizontal scroll bar added or width, max-width and min-width customizable with css variables?
### Actual Behavior
Horizontal bar added because no min-width is set
### Environment
- Angular: 13.0.3
- CDK/Material: 13.1.3
- Browser(s): Chrome, Safari
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
コントリビューションガイド
調査の方向性
cdk-virtual-scroll-viewport とその cdk-virtual-scroll-content-wrapper 要素から始め、リンクされた VirtualScroll-DemoApp と報告されている white-space および overflow スタイルを使って動作を再現します。viewport が不要な水平スクロールを追加しなくなり、意図した幅の制約が引き続き使用可能になれば作業は完了です。関連するテストの場所が見つかった場合は、カバレッジを追加または更新してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100