为什么 autoHeight 属性 没有被识别?
Why is the autoHeight property not being recognized?
我正在尝试使用 autoHeight
属性 设置为 true 创建一些列。但是,我不断收到这些警告:
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/
我的列定义如下所示:
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
};
autoHeight
明确列为有效的列定义 属性。虽然,在调试器中,我正在查看 colDefUtil_1.ColDefUtil.ALL_PROPERTIES
并且 autoHeight
不是可用属性之一。
我正在使用 ag-grid-enterprise v17.0.0。
我的想法是要么我的版本过时了,要么文档过时了。
勾选ag-grid v17.0.0
type definition code for ColDef
here
autoHeight
不是 ColDef
的 属性。
我目前在 v17.1.1
and autoHeight
is declared as number
。
/** True if this column should stretch rows height to fit contents */
autoHeight?: number;
PS:评论说应该是boolean
.
现在这让我想起了一句话 :)
Code never tells a lie, comments however, sometimes do.
我正在尝试使用 autoHeight
属性 设置为 true 创建一些列。但是,我不断收到这些警告:
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/
我的列定义如下所示:
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
};
autoHeight
明确列为有效的列定义 属性。虽然,在调试器中,我正在查看 colDefUtil_1.ColDefUtil.ALL_PROPERTIES
并且 autoHeight
不是可用属性之一。
我正在使用 ag-grid-enterprise v17.0.0。
我的想法是要么我的版本过时了,要么文档过时了。
勾选ag-grid v17.0.0
type definition code for ColDef
here
autoHeight
不是 ColDef
的 属性。
我目前在 v17.1.1
and autoHeight
is declared as number
。
/** True if this column should stretch rows height to fit contents */
autoHeight?: number;
PS:评论说应该是boolean
.
现在这让我想起了一句话 :)
Code never tells a lie, comments however, sometimes do.