如何将 ag-grid-community 从版本 20.1.0 更新到 24.1.0?

How to update ag-grid-community from version 20.1.0 to 24.1.0?

也就是说,我遇到了以下几个错误,但是当我尝试从 AgGrid 文档中查找时,找不到这些属性...它们甚至没有在更改日志中提及以供弃用。 ..

首先,我遇到了这些编译错误

ERROR in : Can't bind to 'enableSorting' since it isn't a known property of 'ag-grid-angular'.

ERROR in : Can't bind to 'enableSorting' since it isn't a known property of 'ag-grid-angular'.

ERROR in : Can't bind to 'enableColResize' since it isn't a known property of 'ag-grid-angular'.

// these 3 bindings are gone? I see no mentioned of them in change log, are they even on by default now?
<ag-grid-angular [enableSorting]="true" [enableFilter]="true" [enableColResize]="true">

其次,这些不在 ag-grid-angularGridOptions 定义中,同样我也无法在他们的文档中找到它们!!!

你们中的一些人经历过哪些通常的迁移方法?请赐教。

现在可以通过列定义启用排序和过滤。因此类型定义将在 ColDef 而不是 GridOptions.

中找到

ColDef 定义请见下文。

如果要对列启用排序/过滤/调整大小,只需添加如下属性:

{ field:'athlete', sortable:true, filter:true, resizable:true }

请参阅documentation on this here