[Table] Expose paginated data on MatTableDataSource
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### 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?
--
コントリビューションガイド
調査の方向性
MatTableDataSource から始めて、フィルタリング、ソート、ページネーションが適用されたレンダリング済みデータが現在どのように公開されているかを調査し、レポートで言及されている非公開の _renderData BehaviorSubject も確認します。既存の公開 API を比較し、現在のページを取得するための文書化された方法を定義します。完了とは、利用者が非公開プロパティにアクセスする必要がなくなることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100