Grid.js v3

Afshin Mehrabani

Afshin Mehrabani

Maintainer of Grid.js

Today, we have released the third major version of Grid.js. v3-beta1 is now available on NPM and CDNs.

Selection plugin

Grid.js supports row selection now. A dedicated plugin for Grid.js is available now: gridjs-selection. This plugin is available on NPM and various CDNs.

Read more about the selection plugin here.

This is the first version of this plugin and more features such as cell selection, radio buttons, etc. will be added soon. In order to integrate this plugin, I have changed the internal structure of the Plugin class and PluginRenderer.

Lerna

Grid.js now uses Lerna to manage the internal and external packages. This enhancement has enabled us to extend Grid.js easier and to release the core and plugin packages using a unified release pipeline.

Lerna

gridjs-selection is the first external package and more will be added soon (e.g. cell editing, data export).

Table width algorithm

I have also improved the table width calculator function. Previously, the autoWidth function had to render the entire table again using a Shadow DOM in order to calculate the widths.

With this change, the function takes a snapshot of the rendered table and resets the CSS attributes to guess the minimum width required to render each cell. This should improve the overall render time especially when columns is large.

And many other minor changes. Please read the changelog before upgrading to v3 since a few backward incompatible changes have been introduced in this release.

Thank you folks!