Virtual scroll collectionViewer.viewChange does not emit when direction is 'rtl'
- 主要言語
- 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
I'm using a `cdk-virtual-scroll-viewport` with `dir='rtl'`, connected to a _CdkDataSrouce_. When scrolling, the `viewChange` event is not emmited, and though I can't load more items as I go. The same code works if I change the direction to `ltr`.
### Reproduction
My template looks like this:
```
...
```
=> where `dataConnector` is my extension of a `CdkDataSrouce`
I think it might be related to having a negative `scrollOffset` when in `rtl` direction.
### Expected Behavior
I am expecting `collectionViewer.viewChange` to fire when I scroll to the left.
### Actual Behavior
It does not fire if the `dir` property is `rtl`
### Environment
- Angular: 12.0.4
- CDK/Material: 12.0.4
- Browser(s): Chrome Version 97.0.4692.71 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 64-bit
コントリビューションガイド
調査の方向性
再現手順で説明されている cdk-virtual-scroll-viewport の動作から始め、RTL スクロール、負の scrollOffset 値、collectionViewer.viewChange がどのように相互作用するかを追跡します。提供されたテンプレートを Angular/CDK 12.0.4 で再現し、rtl で左にスクロールすると viewChange が発生して追加の項目を読み込めることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100