[我在我的项目中使用ngx数据表,该列自动剪切长数据,如何在列中显示整个数据,在此我附上了屏幕截图,以供参考
第二行的实际URL是https://stackoverflow.com/questions/53118910/ngx-datatable-vertical-scroll-with-rowheight-set-to-auto
,但表中某些数据被隐藏,下面是我的datatable属性class="material fixed-header"
[headerHeight]="50"
[limit]="10"
[columnMode]="'force'"
[footerHeight]="50"
[rowHeight]="'auto'"
[rows]="rows"
[loadingIndicator]="loadingIndicator"
[selected]="selected"
[selectionType]="'checkbox'"
[scrollbarH]="true"
任何人都可以解决我的问题
[来自ngx有关强制模式的文档。https://github.com/swimlane/ngx-datatable/blob/master/docs/api/column/modes.md
如果指定的话,比例宽度不得低于最小尺寸。
当您指定每列的宽度时,它们需要合计为屏幕的大小。例如。如果屏幕尺寸为400,则可以有4列宽度为100的列。
如果要支持较小的屏幕,可以将列设置为较小,或在特定断点后使用垂直滚动。但也许最简单的方法是使用flex。[scrollbarH] =“ smallScreen”
我在将[scrollbarH]与rowheight结合使用时也遇到了麻烦。您可以测试选择其中之一。