Skip to content

Hypergrid v2.1.6

Choose a tag to compare

@joneit joneit released this 22 Mar 03:31
· 227 commits to master since this release
6161e8d

Please refer primarily to the Release Notes: v2.1.0 wiki page.
In addition, review the notes in the Hypergrid v2.1.2, Hypergrid v2.1.3, Hypergrid v2.1.4, and Hypergrid v2.1.5 patches.

v2.1.6 fixes bugs and adds new features:

  • Fixed COPY (ctrl-C, command-C) regression (copy select data command)
  • Fixed single-column-after-fixed-column(s) render issue (was crashing renderer)
  • For restoring row selection(s) across data transformations (reindex calls):
    • restoreRowSelections — new property (formerly controlled by the checkboxOnlyRowSelections property which was creating logic conflicts)
    • restoreColumnSelections — new property to restore column selection(s) (new feature)
  • Behavior.prototype.getActiveColumnIndex — a new overload accepts a column name (string) in addition to existing overloads of a data row index (number) or column (object)
  • The behavior.getColumns() and behavior.getActiveColumns() arrays now also serve as column name dictionaries (point to column objects). This makes behavior.columnEnum (which are integers) obsolete (which will be deprecated in v3); if you need to know a column index, you can now ay for a column "per-cent" for example, grid.behavior.getColumns()['per-cent'].index. Names with punctuation are re-added as camel case, including even legal punctuation (_ and $); and names beginning with digit are prefixed with $. Thus, for "per-cent" you can also say grid.behavior.getColumns().perCent.index.
  • Column properties are now picked up from column schema on column create
    • This has advantages over declaring column properties in grid state object.
    • column.addProperties(newProps) — new method doesn't clear existing props first.
    • The demo shows how props can now come from schema as well as from state object (column 'height' has a prop coming each source).
  • Load state (setState) adjustments:
    • behavior.clearState() now clears columns' state as well.
    • grid.addState(state) and behavior.addState(state) — new methods that do not call clearState before applying state.
    • state.columnProperties (column array) can now be an object (with indexes as keys) as well as an array, which makes for easier sparse array JSON strings. Because this object competes with state.columns (column collection by name), it is now always blacklisted by grid.saveState (so only state.columns is output).
  • grid.reindex() — Similarly to repaint(), behaviorChanged, et al, this method can now be called repeatedly within a thread but will only ever be executed one time before the next render.
  • Assigning a value of undefined with the various set property methods now deletes the property from the properties object, revealing the underlying value from the prototype.
  • Row properties objects now have the grid properties object as their prototype (similar to column properties objects).
  • Registry.js has been simplified.
    • It no longer cares what kind of item is being registered.
    • It no longer has the ability to instantiate singletons from a constructor item.
    • It no longer supports global registries; all registries are now private.
  • CellEvent's row property support has been improved to be subgrid-aware. (This was an oversight.)
  • getActiveColumnIndex(columnOrIndexOrName: (object|number|string)) — The string overload is new and accepts a column name.
  • Some Column constructor overloads have been deprecated.

Published to npm

This release has been published as a module to the npm registry.

Pre-bundled build file

A bundled build of this release is available on the CDN.