[英]CSS - MaterialUI - How can I make a table always take the full width, and not need horizontal scroll?
I have tried to set each widthPercent on each TableHeader to add up to 100%, but the scroll bar is still there.我试图将每个 TableHeader 上的每个 widthPercent 设置为 100%,但滚动条仍然存在。
I can set static widths per column, but I end up with extra space on the right depending on the size of the window.我可以设置每列的静态宽度,但根据窗口的大小,我最终会在右侧留出额外的空间。
How do I make the table always use the full width available to it, but also always wrap text so the table does not need horizontal scroll?如何使表格始终使用可用的全宽,但也始终环绕文本以便表格不需要水平滚动?
I solved it:我解决了:
MuiTable css override: tableLayout: "fixed"
MuiTable css 覆盖:
tableLayout: "fixed"
MuiTableCell css override: overflow: "hidden", textOverflow: "ellipsis"
MuiTableCell css 覆盖:
overflow: "hidden", textOverflow: "ellipsis"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.