在用Virtualize组件呈现的表中使用rowspan标签
我正在努力在使用组件呈现的表中设置rowspan
。看来,对于每个渲染视图,我都需要构建一个自定义的表脚手架才能获得适当的rowspan。
<table>
<thead>...</thead>
<tbody>
<Virtualize Items="@Models" Context="model">
<tr>
<th rowspan="??">label of several rows<th>
<td>model data in cell</td>
<td>model data in cell</td>
...
<td>model data in cell</td>
</tr>
</Virtualize>
</tbody>
<tfoot>...</tfoot>
</table>
在哪里 ”??”是一个非恒定值。
我看到的唯一解决方案是获取组件中列表的当前渲染部分。有没有办法获取此类数据?
看看 fiddle 。如果虚拟化组件仅在2到7之间呈现,则表留在第一行rowspan
标签的情况下,它像 fiddle 。
Im struggling with setting a rowspan
in a table rendered using component. It seems that for every rendered view I need to build a custom table scaffolding in order to get proper rowspan.
<table>
<thead>...</thead>
<tbody>
<Virtualize Items="@Models" Context="model">
<tr>
<th rowspan="??">label of several rows<th>
<td>model data in cell</td>
<td>model data in cell</td>
...
<td>model data in cell</td>
</tr>
</Virtualize>
</tbody>
<tfoot>...</tfoot>
</table>
Where "??" is a non-constant value.
The only solution I see is to get the currently rendered part of the list in the component. Is there a way to get such data?
Take a look at the Fiddle. If the Virtualize component renders only rows between 2 and 7, the table is left without the first row rowspan
tag and hance it is broken like in this Fiddle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论