简体   繁体   English

在具有flex-direction的flexbox中,ngx-datatable不缩小:行

[英]Ngx-datatable not shrinking when within flexbox with flex-direction: row

I place 2 block level elements within a container div with display: flex; 我将2个块级元素放置在带有display: flex;的容器div中display: flex; and flex-direction: row; flex-direction: row; . The first element has a fixed with and doesn't shrink nor expanded to horizontal browser resize. 第一个元素具有固定的,不会缩小或扩展为水平浏览器调整大小。 The second element is an Ngx-datatable which should shrink and expand on browser horizontal resize. 第二个元素是Ngx数据表 ,该表应在浏览器水平调整大小时缩小和扩展。

When I try to increase browser width, the table grows as expected. 当我尝试增加浏览器宽度时,表将按预期增长。 Problem arises when I try to reduce browser width. 当我尝试减小浏览器宽度时会出现问题。 The table doesn't shrink and instead place overflowed contents on a scrollbar. 该表不会缩小,而是将溢出的内容放在滚动条上。

Screenshot: https://i.imgur.com/wJHjziR.png 截图: https//i.imgur.com/wJHjziR.png

Demo: https://stackblitz.com/edit/angular-vimhiq 演示: https : //stackblitz.com/edit/angular-vimhiq

My goal is to make the table responsize so that it would grow and shrink on browser resize. 我的目标是使表具有响应性,以便它在浏览器调整大小时可以增长和收缩。

.table-wrapper { 
   min-width: 0;
   ...
} 

solves your problem. 解决您的问题。

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

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