angular / angular/components

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

未关闭
#29,533 0 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/table area: material/table feature
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
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 摘要。