angular / angular/components

Virtual scroll collectionViewer.viewChange does not emit when direction is 'rtl'

Abierto
#24,269 1 comentario 0 reacciones 0 asignados Ver en GitHub
area: cdk/scrolling P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comience con el comportamiento de cdk-virtual-scroll-viewport descrito en la reproducción y rastree cómo interactúan el desplazamiento RTL, los valores negativos de scrollOffset y collectionViewer.viewChange. Reproduzca la plantilla proporcionada con Angular/CDK 12.0.4 y, a continuación, verifique que desplazarse hacia la izquierda en rtl emita viewChange para que se puedan cargar elementos adicionales.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.