Clarity: Is there a recommended way to make clr-datagrid take up all available vertical space?

自闭症网瘾萝莉.ら 提交于 2019-12-19 08:30:21

问题


I am trying to make my take up all vertical space even if there are no rows in the table yet. Is clr-datagrid customizable to do so? It seems like I have to manually override flexbox properties of .datagrid-host and .datagrid-overlay-wrapper in order to make it grow in column direction.

I tried even that but the datagrid don't seem to be growing vertically.


回答1:


The Clarity datagrid supports any fixed height you want on the datagrid element itself. If the height is too large for the number of displayed rows, the body will expand with empty space. If the height is too small for the number of displayed rows, the body will scroll while the header and footer remain in place.

So in your case, it's as simple as putting height: 100% for the datagrid in your CSS. That's all you need to do. See https://plnkr.co/edit/eZqaic8CS6CFHVcGxAnH?p=preview for a working example.



来源:https://stackoverflow.com/questions/46375081/clarity-is-there-a-recommended-way-to-make-clr-datagrid-take-up-all-available-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!