Hypergrid v2.1.14
- This patch release
v2.1.14
supersedesv2.1.13
- Reflects PRs #731
- Note that there were no releases
v2.1.1
,v2.1.9
,v2.1.11
, or2.1.12
See also
In addition to the release notes below, please refer also to:
- Release Notes: v2.1.0 wiki page
- Notes for all subsequent releases through
v2.1.13
(following these notes)
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.
Synopsis
This release adds some new features and fixes some bugs:
New features
- Add support for Tree column & Row number column cell properties
- New demo:
filter-row.html
- Add
editor
property for filter row cells - Add
Base.prototype.atLeastVersion
- Add support for cell renderer overlays
- New demo:
over-render.html
- Add
fin-row-header-click
event (cancelable)
Bug fixes
- Fixed issues with registry synonyms
- Faster renderer lookup
New features
1. Add support for Tree column & Row number column cell properties
- Properties set on Individual cells in these columns now function correctly.
- Among other things, the top-left cell can now be bound to a custom cell renderer:
var b = myGrid.behavior; b.setCellProperty(b.rowColumnIndex, 0, 'renderer', ‘custom’, b.subgrids.lookup.header);
- Row number column now has a name:
RowHeader
(previously was empty string).
2. New demo: filter-row.html
Demonstrates how to:
- Create and display a filter cell row
- Bind a cell editor to it.
The included cell editor demonstrates how to:
- Trigger the
fin-filter-applied
event when a column filter changes. - Implement "immediate keypress" mode (issues a filter event on every keypress rather than waiting for the editor to be closed).
3. Add editor
property for filter row cells
This new property makes it much simpler to bind a cell editor to cells in the filter. Serializes as filterEditor
. See the filter-row.html
demo code for example of how to bind with and without this new property.
4. Add Base.prototype.atLeastVersion
if (grid.atLeastVersion('2.1.14')) {
. . . // use a new feature
}
5. Add support for cell renderer overlays
This new feature coded to have minimal performance impact (as usual).
- A cell's
renderer
prop may now accepts an array-of-string overload of cell renderer names:grid.properties.renderer = ['SimpleCell', 'Tag'];
- Each listed cell renderer will be called in turn.
- In the example above, we set the entire grid to call for every cell the
SimpleCell
cell renderer followed by theTag
cell renderer:SimpleCell
— The first cell renderer listed should render the cell contents, including possibly the cell background color (as needed per grid renderer strategy).Tag
— The remaining cell renderer(s) in the list are assumed to be "overlay renderer(s)" that add superimposed graphic elements. They are dependent on being preceded by a regular cell renderer for the basic cell contents.
- The
Tag
cell renderer is provided as an example of a cell renderer intended to be used as an overlay. It renders a "tag" (small triangle) in the upper-right corner of the cell whose color is determined by the cell value. Tag
only renders a tag over cells with a definedtagbands
property. For example, cells with the followingtagbands
definition will render a green tag for values ≥ 128; else yellow for values ≥ 64; else red for the remaining positive values.:myColumnOrCell.properties.tagbands = [ { floor: 128, fillStyle: 'green' }, { floor: 64, fillStyle: 'yellow' }, { floor: 0, fillStyle: 'red' } ];
- Note that although we set the entire grid to call render
Tag
overlays, only the cells with atagband
property will actually render tags. (It would of course be more efficient to only set those cells'renderer
properties to an array that includesTag
and leave the rest of the cells set to the scalarSimpleCell
.)
6. New demo: over-render.html
Demonstrates how cell renderer overlays work using the new Tag
cell renderer.
7. Add fin-row-header-click
event (cancelable)
Easy way to intercept a click in the row number cell to do something with the input in addition to selecting the row, or call event.preventDefault()
in the handler to do something else rather than selecting a row.
Bug fixes
1. Fixed issues with registry synonyms
Registry.prototype.add
now updates synonyms that differ only in case.- Fixed an issue with
Registry.prototype.addSynonym
issue.
2. Faster renderer lookup
The cellRenderers.get('emptycell')
deprecation check is now faster by avoiding toLowerCase(name)
on every renderer lookup.
API docs
Simplified cell renderer jsdoc pages.