Vue Data GridUpgrading to AG Grid 31.2

What's New

See the release post for details of what's new in version 31.2.

Codemods

Follow these steps to upgrade your project's AG Grid version to 31.2.0:

  1. Locate your project's package.json and note the version of AG Grid that you are currently using.

  2. Update any AG Grid dependencies listed in your project's package.json to version 31.2.0.

  3. Open a terminal and navigate to your project's root folder.

  4. Run the migrate command of version 31.2 of the AG Grid codemod runner, where $FROM_VERSION refers to your project's existing AG Grid version:

    npx @ag-grid-devtools/cli@31.2 migrate --from=$FROM_VERSION
    

    This will update your project's source files to prepare for the new release.

    By default the Codemod runner will locate all source files within the current directory. For projects with more specific requirements, pass a list of input files to the migrate command, or specify the --help argument to see more fine-grained usage instructions.

The Codemod runner will check the state of your project to ensure that you don't lose any work. If you would rather see a diff of the changes instead of applying them, pass the --dry-run argument.

The codemod only transforms source files that make use of deprecated features, so if you aren't currently making use of any of those APIs your source code will be unaffected by the codemod.

See the Codemods documentation for more details.

Breaking Change

React 17 users that use Create React App will need to do the following

npm install react-app-rewired --save-dev

Create a file in the root of your project called config-overrides.js with the following contents:

module.exports = function override(config, env) {
    config.resolve.alias["react-dom/server"] = "react-dom/server.js";
    return config;
}

Replace the following scripts in your package.json:

"react-scripts start" -> "react-scripts start"
"react-scripts build" -> "react-scripts build"

This is only necessary if you use React 17 AND Create React App. If you use React 18+ or don't use Create React App then this step is not necessary.

Deprecations

This release includes the following deprecations:

GridOptions

  • enableCellChangeFlash - deprecated, set enableCellChangeFlash on the column definitions instead.

Column API