在本地运行Basic AngularJS 1.x Example,找出style="height: 100%;"
是否将网格折叠成水平线。将它设置为其他值,比如100px就行了。除了我的Angular是1.5.0,和ag-grid v8.1.0之外,一切都是一样的。
<div ng-controller="exampleCtrl">
<div ag-grid="gridOptions" class="ag-fresh" style="height: 100%;"></div>
</div>
看起来像窃听器。
发布于 2017-02-23 16:55:27
这几乎可以肯定是因为您的html文件中有DOCTYPE html。
如果你这样做了,那么你需要确保网格容器有一个非0的高度来填充,否则它会像你所发现的那样显示为一条平坦的线。
这不是ag-Grid特有的问题--这是没有使用quirks模式的副作用。
你要做的最简单的事情是:
<style>
html, body {
width: 100%;
height: 100%;
}
This StackOverflow Question/Answer很好地解释了潜在的问题
发布于 2020-05-15 15:40:05
有关angular.,请参阅下面的示例代码
onGridReady(params) {
this.gridApi = params.api;
this.gridColumnApi = params.columnApi;
//The ag-grid is not enlarging based on the page height,
//so dynamically adjusting the height of the grid
this.gridApi.setDomLayout("autoHeight");
}
发布于 2020-10-21 20:10:49
.ag-root-wrapper-body.ag-layout-normal.ag-focus-managed {
height: 100%;
}
https://stackoverflow.com/questions/42400979
复制相似问题