feat(Mat-Table): Allow for adding multiple TBODY within Mat-Table
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Feature Description
In the current cdk Table implementation we can only have on `` with a `matRowDef`. This will generate a TBODY element with the TR's inside.
That works fine for most use case.
I would like to be able to add a second TBODY with a selection of the rows of the datasource (based on a filter) so that I have 2 groups of rows within the same table.
I tried using the When option in matRowDef but that doesn't result in 2 TBODY's, but it comes close into what I am looking for.
### Use Case
I am having a list of Categories of which the top 3 can have primary flag. Those are display at the top, then row 4 until X is the non primary Categories.
I enabled drag and drop and I only want to be able to order the Primary rows within their TBODY and the non-primary rows in their TBODY. So you can't accidentally drop a Non primary row into a primary block.
You can control if a category is primary or not by editing the Category itself.
So to sum up feature request:
- Allow for multiple TBODYs which can have a filtered collection of the datasource
- Allow Drag and drop within that tbody only
コントリビューションガイド
調査の方向性
CDK Table の実装と matRowDef When オプションから始めて、現在単一の TBODY がどのように生成されているかを理解します。複数のフィルタリングされた datasource グループをどのようにレンダリングするか、またドラッグアンドドロップを各 TBODY 内にどのように維持するかを定義します。完了とは、説明されているプライマリおよび非プライマリのカテゴリグループについて、両方の動作が機能することを意味します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100