val*_*gar 6 javascript height row ag-grid
我想将每个 ag-grid 行的最小高度指定为 40px,并允许任何超过 40px 的行使用动态高度。
this.gridOptions = {
/* rowHeight : 40, */
headerHeight: 100,
pagination: true,
enableSorting: true,
enableColResize: true,
rowDeselection: true,
suppressHorizontalScroll: false,
autoHeight: true
};
Run Code Online (Sandbox Code Playgroud)
gridOptions.autoHeight让我动态更改高度,但分配类似gridOptions.rowHeight 的内容或使用getRowHeight(params)设置默认的最小高度会覆盖 autoHeight。有办法解决这个问题吗?
设法解决了这个问题,在这里为可能遇到同样问题的其他人发布答案:
我需要更改一些内容:
这些步骤根据内容调整行的高度。