Virtual scroll collectionViewer.viewChange does not emit when direction is 'rtl'
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le comportement de cdk-virtual-scroll-viewport décrit dans la reproduction et suivez l’interaction entre le défilement RTL, les valeurs négatives de scrollOffset et collectionViewer.viewChange. Reproduisez le modèle fourni avec Angular/CDK 12.0.4, puis vérifiez que le défilement vers la gauche en rtl émet viewChange afin que des éléments supplémentaires puissent être chargés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100