简体   繁体   English

React Ant 设计 - 如何将表格设置为 100% 高度

[英]React Ant Design - How to set Table to 100% height

How can I resize and expand the React Ant Design Table to 100% height when the parent container or the browser window are resized too?当父容器或浏览器 window 也被调整大小时,如何调整 React Ant 设计表的大小并将其扩展为 100% 高度?

Demo: https://codesandbox.io/s/react-ant-design-table-set-100-height-8lkdg演示: https://codesandbox.io/s/react-ant-design-table-set-100-height-8lkdg

Set minHeight to ant-table-bodyminHeight设置为ant-table-body

.ant-table-body {
  min-height: 500px;
}

Refer to the scroll zone参考滚动区

<Table
  scroll={{ y: 500, x: 500 }}
...

在此处输入图像描述

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

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