Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ag grid 为什么无法识别autoHeight属性?_Ag Grid - Fatal编程技术网

Ag grid 为什么无法识别autoHeight属性?

Ag grid 为什么无法识别autoHeight属性?,ag-grid,Ag Grid,我正在尝试使用设置为true的autoHeight属性创建一些列。然而,我不断收到这些警告: ag-grid: invalid colDef property 'autoHeight' did you mean any of these: suppressAutoSize,headerTooltip,openByDefault,headerComponent,suppressSizeToFit,sort,headerGroupComponent,pivot <...snip...>

我正在尝试使用设置为true的
autoHeight
属性创建一些列。然而,我不断收到这些警告:

ag-grid: invalid colDef property 'autoHeight' did you mean any of these: suppressAutoSize,headerTooltip,openByDefault,headerComponent,suppressSizeToFit,sort,headerGroupComponent,pivot
<...snip...>
ag-grid: to see all the valid colDef properties please check: https://www.ag-grid.com/javascript-grid-column-properties/
autoHeight
被明确列为有效的列定义属性。不过,在调试器中,我正在查看
colDefUtil\u 1.colDefUtil。所有属性
autoHeight
都不是可用属性之一

我使用的是ag grid enterprise v17.0.0

我的想法是,要么我的版本已经过时,要么文档已经过时。

检查
v17.0.0
类型定义代码

autoHeight
不是
ColDef
的属性

我现在在

PS:评论建议它应该是一个
布尔值

这让我想起了一句谚语:)

代码从不说谎,但注释有时会说谎


这是有道理的。这让我很困惑,因为我回顾了以前的发行说明,我一直看到那里提到了
autoHeight
属性。Eg-v15.0.0
const columnDefs = [
  {
    headerName: 'Id',
    field: 'id',
    filter: 'agTextColumnFilter',
    width: 90
  }, {
    headerName: 'Description',
    field: 'sportLeage',
    filter: 'agTextColumnFilter',
    autoHeight: true,
    valueGetter: params =>
      params.context.liveEventsController
        .createDescription(params.data),
    width: 90
  };
/** True if this column should stretch rows height to fit contents */
autoHeight?: number;