angular / angular/components

feat(cdk/table): Possibility to add custom context to each row cell

オープン
#29,533 コメント 0 件 リアクション 8 件 担当者 0 名 GitHub で見る
area: cdk/table area: material/table feature
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Feature Description

Currently, the only context passed to the cell is: count, first, last, even, odd. However, this only works properly without pagination. If the table has pagination, we're stuck with these basic variables that are only relative to the page in display and not relative to the whole dataset being used, under the hood.

I'd would suggest giving the possibility to customize this behaviour via an optional method that is called when you run "_updateRowIndexContext". This new optional method would receive the context object that you currently have and expand on it according to what each project requires.

### Use Case

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、_updateRowIndexContext を含む Angular CDK のテーブル実装を見つけ、現在の count、first、last、even、odd コンテキストがどのように構築されているかを確認します。オプションのカスタマイズ API を特定し、ページネーションされた行のカバレッジを追加します。プロジェクトが既存のコンテキストを壊すことなく、データセットに対する相対値でコンテキストを拡張できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。