简体   繁体   English

带有自定义行的角材料表

[英]Angular material table with custom rows

I have a table which is sorted by date, but it is fairly big, so we want to add some guidance rows to help the user orientate through the data. 我有一个按日期排序的表,但是它很大,因此我们想添加一些指导行来帮助用户确定数据的方向。

The generel structure we want is, 我们想要的普通结构是

|_Header1_|_Header2_|
| 25/11/2018        |
| Row1    | Row1    |
| Row2    | Row2    |
| Row3    | Row3    |
| 26/11/2018        | 
| Row4    | Row4    |
| Row5    | Row5    |
| Row6    | Row6    |
| Row7    | Row7    |
| 27/11/2018        |
 ...

We use Angular 4 with Angular Material 2.0.0-beta.8 , And it is impossible to update it right now. 我们将Angular 4与Angular Material 2.0.0-beta.8 ,并且现在无法对其进行更新。 How can this be implemented using angular material, and if it is not possible with angular material, what should be done? 如何使用角形材料实现此目的,如果不能用角形材料实现,应怎么办?

I am not quite sure about how to do this with material table but this can be achievable easily by Bootstrap table. 我不太确定如何使用材质表执行此操作,但是可以通过Bootstrap表轻松实现。 You just need to create a map which can store a key as your date and value as list of the data for the date. 您只需要创建一个地图即可将键存储为日期,并将值存储为该日期的数据列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM