angular / angular/components

[Table] Expose paginated data on MatTableDataSource

Abierto
#9,419 6 comentarios 1 reacción 0 asignados Ver en GitHub
area: material/table feature P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### Bug, feature request, or proposal:
feature request

#### What is the expected behavior?
`MatTableDataSource` should provide a method to get currently rendered data which is filtered, sorted and paginated.

#### What is the current behavior?
At the moment I couldn't find the right way to get rendered data(It may exist but it's not documented).

#### What are the steps to reproduce?
--

#### What is the use-case or motivation for changing an existing behavior?
I have found a hacky way to get currently rendered data on the table page.
The data is filtered, sorted, and paginated, so I have to get the currently visible data, for let's say row selection's page toggle(clicking it will select all filtered and sorted data on the current table page).

I'm using `this.dataSource['_renderData']['value']`, but the problem is that, `_renderData` is a `private` property of type `BehaviorSubject`. So accessing data in this way doesn't look good.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
latest

#### Is there anything else we should know?
--

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en MatTableDataSource e inspecciona cómo se exponen actualmente sus datos renderizados, filtrados, ordenados y paginados, incluido el BehaviorSubject privado _renderData mencionado en el informe. Compara las APIs públicas existentes y define una forma documentada de recuperar la página actual; se considerará completado cuando los consumidores ya no necesiten acceder a propiedades privadas.

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
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.