问题描述
我在我的 Angular10 应用程序中使用了“ngx-datatable”。该应用使用 flex 来布局常用的标题、侧边栏和数据区域面板。
我已将 ngx-datatable 包裹在具有 flex 布局的 div 中。在打开应用程序网页时,包装器 div 正确调整大小以占用所有可用的水平和垂直空间,但 ngx-datatable 不会调整大小以占用所有垂直可用空间,如下所示
.full-area-grid {
height: 100% !important;
width: 99% !important;
}
.eis-vBox {
height: 100%;
width: auto;
Box-sizing: border-Box;
display: flex;
flex: auto;
flex-direction: column;
align-items: stretch;
padding: 0px;
margin: 0px;
}
<div id="simpleListWrapper" #wrapper class="eis-vBox" >
<ngx-datatable #simpleListTable id="simpleList"
class="material striped full-area-grid"
[rows] = "rows$ | async"
[columns]="columns"
[sorts]="sorts"
[scrollbarV]="true"
[footerHeight]="50"
[headerHeight]="50"
[rowHeight]="40"
selectionType="checkBox"
[loadingIndicator]="isloading > 0"
[scrollbarV]="true"
[externalPaging]="true"
[externalSorting]="true"
[count]="totalRows$ | async"
[offset]="pageNumber$ | async"
(page)="setPage($event)"
(sort)="onSort($event)"
(select)="onSelect($event)"
>
</ngx-datatable>
</div>
查看网页的显示方式,包装器 div 的最终大小调整发生在表格呈现自身并获取数据之后。
我想知道是否可以在包装器 div 上捕获调整大小事件,然后以某种方式强制调整表格大小?
有什么建议吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)