[CdkTable] expose _insertRow to derived classes
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Bug, feature request, or proposal: proposal
#### What is the expected behavior?
`_insertRow` is visible to inheriting classes
#### What is the current behavior?
`_insertRow` is private
#### What is the use-case or motivation for changing an existing behavior?
In `_insertRow` the context is created (`RowContext`).
The row context is very useful as a metadata storage for the row, storing information about the row that helps when we want to create features that require state.
For example, flagging if the row is currently being edited, which cell is edited. If the row is being dragged or not etc...
This is also true for a specific cell, metadata for it can be saved on the row context.
#### Is there anything else we should know?
Because `_insertRow` calls `_renderRow`, which is also private, it will require exposing `_renderRow` as well, which is dont think is such a bad thing.
But, if we want to avoid that, maybe it will be better to expose a new protected method, `_createRowContext(data: T): RowContext ` that people can extend
コントリビューションガイド
調査の方向性
まず CdkTable の _insertRow メソッドと _renderRow メソッド、および RowContext がどのように作成されるかを読んでください。派生クラスが既存のメソッドにアクセスすべきか、それともコンテキスト作成用の protected なエントリーポイントにアクセスすべきかを判断してください。選択した API が派生クラスの行メタデータをサポートし、動作を曖昧なままにしないことが完了の条件です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100