angular / angular/components

[Table] Remove requirement for a header or data row template

未关闭
#7,604 10 条评论 26 个 reaction 已指派 0 人 在 GitHub 查看
area: material/table needs: discussion P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

It's valid that tables may not want any header, or a table could *only* be a header. Support this use case by letting users avoid defining a `cdk-header-row` or `cdk-row` which means that they should not be inserted.

Motivation: A table footer row could be a single row composed of a single row without a header. If placed after a preceding table, it acts as a sticky footer. Works well for cases where the header should not affect the rows, e.g. a totals row

Note that this doesn't help in cases where a scrollbar appears on one container but not the other. This will cause misalignment on browsers that push content left to show a scrollbar rather than overlay it (e.g. safari)

贡献指南

打开贡献指南

调研方向

首先搜索 Angular CDK 的表格实现和测试,查找 `cdk-header-row` 和 `cdk-row` 模板的处理方式。验证没有表头的表格、没有数据行模板的表格以及仅有表头的表格的行为;当省略的模板不会被插入,而受支持的行仍会渲染时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。