Javascript agGrid汇总示例显示缺少的ClientSideRowModelModule
我尝试执行ag grid在其页面上显示的最小汇总示例。但不管怎样,我都不会让它工作。我得到的错误是:Javascript agGrid汇总示例显示缺少的ClientSideRowModelModule,javascript,ag-grid,rollup,Javascript,Ag Grid,Rollup,我尝试执行ag grid在其页面上显示的最小汇总示例。但不管怎样,我都不会让它工作。我得到的错误是: ag-Grid: could not find matching row model for rowModelType clientSide Row Model "Client Side" not found. Please ensure the ClientSideRowModelModule is loaded using: import '@ag-grid-community/client
ag-Grid: could not find matching row model for rowModelType clientSide
Row Model "Client Side" not found. Please ensure the ClientSideRowModelModule is loaded using: import '@ag-grid-community/client-side-row-model';
我尝试导入ClientSideRowModel模块
和ClientSideRowModel
,如错误中所述,但没有任何改变
我尝试并逐步浏览了捆绑的代码,aggrid似乎不可能访问自己的模块,尽管它们存在
我将示例上传到github,只需克隆,npm I&&npm run rullup
,然后打开index.html文件。
好吧,我设法让它工作起来了 旧的: 新的: 我不知道为什么在所有这些示例中都没有这个功能,但是您需要手动注册模块,即使您使用“
all modules
”包
它不知道,所有模块都应该在启动时加载。这是一个很好的解决方案,但不幸的是,它只是解释
显然,您可以只加载实际需要的模块,而不是AllCommunityModules
git clone git@github.com:dennis-f/ag-grid-clientsiderowmodel-bug.git
npm i && npm run rollup
import {Grid} from '@ag-grid-community/all-modules';
import {AllCommunityModules, Grid, ModuleRegistry} from '@ag-grid-community/all-modules';
ModuleRegistry.registerModules(AllCommunityModules);