Skip to content

Release Notes: v2.0.0

Jonathan Eiten edited this page Feb 5, 2018 · 2 revisions

Add-ons

ALL OF THE ADD-ONS HAVE BEEN REMOVED If you would like a copy of the original code, feel free to checkout the v1.3.0 release.

Introducing The Standard Tree Column

Demo

Everyone can take a look at an review this example alpha branch demo tree-column.html

Please Note the renaming of the yet to be official API calls: All notions of DrillDown and Hierarchy and now simply referred to as "tree' Everyone can take a look at an review this example develop branch demo tree-column.html

Updated 3/10/2017 based on Pull Requests #574, #575 and #571.

Properties

ADDED

    /********** SECTION: TREE HEADER COLORS **********/

    /**
     * @default
     * @type {cssFont}
     * @memberOf module:defaults
     */
    treeHeaderFont: '12px Tahoma, Geneva, sans-serif',

    /**
     * @default
     * @type {cssColor}
     * @memberOf module:defaults
     */
    treeHeaderColor: 'rgb(25, 25, 25)',

    /**
     * @default
     * @type {cssColor}
     * @memberOf module:defaults
     */
    treeHeaderBackgroundColor: 'rgb(223, 227, 232)',

    /**
     * @default
     * @type {cssColor}
     * @memberOf module:defaults
     */
    treeHeaderForegroundSelectionColor: 'rgb(80, 80, 80)',

    /**
     * Font style for selected rows' headers.
     * @default
     * @type {string}
     * @memberOf module:defaults
     */
    treeHeaderForegroundSelectionFont: 'bold 12px Tahoma, Geneva, sans-serif',

    /**
     * @default
     * @type {cssColor}
     * @memberOf module:defaults
     */
    treeHeaderBackgroundSelectionColor: 'rgba(255, 220, 97, 0.45)',

REMOVED

   /********** SECTION: SORTING **********************/
    maxSortColumns : 3,

    /** Ignore sort interaction (double-click).
     * @type {boolean}
     * @default
     * @memberOf module:defaults
     */
    unsortable: false,

    /**
     * @default
     * @type {boolean}
     * @memberOf module:defaults
     */
    sortOnHiddenColumns: true

    /********** SECTION: FILTER ROW COLORS **********/

    /**
     * This is used only by FilterBox cell editor.
     * One of:
     * * **`'onCommit'`** - Column filter state not set until keyup === `\r` (return/enter key)
     * * **`'immediate'`** - Column filter state set on each key press
     * @default
     * @type {boolean}
     * @memberOf module:defaults
     */
    filteringMode: 'onCommit'

Notes

Added Standard TreeColumn index -1, moving rowHandleColumn index to -2 Users can now build their own heirarchal view leveraging the treeColumn, and its open to customization as with other columns

Steps

  • grid.properties.showTreeColumn = true
  • Implement grid.behavior.dataModel.isTree()
  • Implement grid.behavior.dataModel.isTreeCol(x)
  • Implement grid.behavior.dataModel.isLeafNode(y)
  • Override grid.behavior.dataModel.toggleRow // In the future it will emit an event akin to drillDownClickEvent leveraging grid.behavior.dataModel.isTreeCol(y)
  • Implement grid.behavior.dataModel.getValue and setValue for when y is -1 the treeColumn
  • set the renderer grid.properties.treeRenderer = "SimpleCell" //There is a Tree Cell Renderer but it has not been fleshed out

Changeset

  • Non-Colliding findWithNegand forEachWithNeg functions and totalLength property for grid.renderer.visibleColumns array
  1. Handles iteration with negative indices
  2. Regular array methods work as expected
  3. Considered ES5 Proxy but not supported in Chrome 40
  • Added dataModel.isTreeCol(y) and dataModel.isLeafNode(y) and dataModel.isTree()
  • Added behavior.hasTreeColumn()
  • Updated dataModel.dataSource.schema to be aware of the tree and rowHandle column
  • Note that dataModel.getHeaders() or dataModel.getFields() still only relay information relating to dataCells

Also added read-only accessors on behavior

  • behavior.treeColumnIndex
  • behavior.rowNumColumnIndex
  • behavior.leftMostColumnIndex

Notes

  • Updated Group and Aggregations View to use the Tree Column
  • TreeView was updated to reflect the new TreeColumn but to since it was designed differently that * Group and Aggregations, it still uses a dataColumn that acts as a treeColumn

Group View Bugs Resolved

  • Column State Gets Reset when Group View is Enabled
  • Moved Tree Column from Data Portion of the grid