bug(VirtualScroll): Horizontal scrolling inside cdk-virtual-scroll-viewport
- 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
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
Guía de contribución
Línea de trabajo
Comienza con cdk-virtual-scroll-viewport y su elemento cdk-virtual-scroll-content-wrapper; después reproduce el comportamiento usando la VirtualScroll-DemoApp enlazada y los estilos white-space y overflow indicados. El trabajo estará terminado cuando el viewport ya no añada desplazamiento horizontal no deseado y las restricciones de ancho previstas sigan siendo utilizables; añade o actualiza la cobertura si se encuentra la ubicación de prueba relevante.
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
- 45/100