Search code examples
ag-gridupgradeag-grid-angular

AG-Grid upgrade from 27 to 28 import errors - Angular


I try to upgrade from AG-Grid 27 modules

"@ag-grid-community/angular": "^27.0.0",
"@ag-grid-enterprise/all-modules": "^27.0.0",

to 28.2 packages

"ag-grid-angular": "^28.2.0",
"ag-grid-community": "^28.2.0",
"ag-grid-enterprise": "^28.2.0",

(Based on the ag-grid documentation packages has everything you need, you don't need to install modules like above see v 27.0.0)

foo.ts - v27.0.0 - @ag-grid-enterprise/all-modules
import {
!NO IMPORT ERRORS!
} from '@ag-grid-enterprise/all-modules';

But I still have import errors:

foo.ts - v28.2.0 - ag-grid-enterprise
import {
BodyScrollEvent, < Module '"ag-grid-enterprise"' has no exported member 'BodyScrollEvent'.
CellKeyPressEvent, < Module '"ag-grid-enterprise"' has no exported member 'CellKeyPressEvent'.
CellValueChangedEvent,  < Module '"ag-grid-enterprise"' has no exported member 'CellValueChangedEvent'
CheckboxSelectionCallback,
ColDef,
Column,
ColumnApi,
...
} from 'ag-grid-enterprise';

What did I wrongly, if the packages has everything ?


Solution

  • I don't use BodyScrollEvent but the CellValueChangedEvent and CellKeyPressEvent are now in ag-grid-community. Please could you try

    import { CellValueChangedEvent, CellKeyPressEvent } from 'ag-grid-community';
    

    If that works, it might be the same with BodyScrollEvent as well