[Table] Expose paginated data on MatTableDataSource
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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?
--
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par MatTableDataSource et examinez comment ses données rendues, filtrées, triées et paginées sont actuellement exposées, y compris le BehaviorSubject privé _renderData mentionné dans le rapport. Comparez les APIs publiques existantes et définissez une manière documentée de récupérer la page actuelle ; le travail sera considéré comme terminé lorsque les consommateurs n’auront plus besoin d’accéder à des propriétés privées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100