HexagonJS
Extended Table Changelog
1.0.0
Removed
This module was replaced with the data table module in this version.
hx.TableextendsEventEmitter
Removed
0.15.3
hx.TableextendsEventEmitter
Bugfix
Normalise cell renderer keys to lower case
Deprecated
This module has been deprecated in favor of the data-table module. This module will be removed in version 2.0.0 of hexagon.
0.15.2
hx.TableextendsEventEmitter
Bugfix
Fix for issue when setting sorts/filters before setting the data for a table
Deprecated
This module has been deprecated in favor of the data-table module. This module will be removed in version 2.0.0 of hexagon.
0.15.1
hx.TableextendsEventEmitter
Bugfix
Fix for tables when in compact mode with no data. Also update pickers to use the new event types which was causing an infinite loop in 0.15.0. Squash deprecated warnings for tables.
Deprecated
This module has been deprecated in favor of the data-table module. This module will be removed in version 2.0.0 of hexagon.
0.15.0
hx.TableextendsEventEmitter
Deprecated
This module has been deprecated in favor of the data-table module. This module will be removed in version 2.0.0 of hexagon.
0.12.8
hx.TableextendsEventEmitter
Bugfix
Fixed a bug where the rowselect event was not being emmitted when a row was unselected.
0.12.6
hx.TableextendsEventEmitter
Updated
Added the rowSelectableLookup function to determine whether a row is selectable after it has been clicked and added the ability to disable row selection entirely using the unselectable property in the row data.
Bugfix
Fixed a styling bug where the selected row was not highlighted for mobile view
hx.Table
options
rowSelectableLookup
Added
Added a function that is called when a row is selected to determine whether the row should be able to be selected.
hx.Table
setDatadataObject / String / Function
Updated
Added the ability to make rows unselectable when rendering the table.
hx.Table
rowclick
Added
An event called when a row is clicked
0.12.5
hx.TableextendsEventEmitter
Updated
Updated the table paginator to be more inline with paginators used in other tables and to make it make more sense.
hx.Table
options
allowHeaderWrapBoolean
Added
A boolean value that determines whether the header text should be allowed to wrap or not.
hx.Table
options
userSelectRowsPerPageBoolean
Added
A boolean value that determines whether the dropdown for selecting the number of rows per page should be shown.
hx.Table
options
singleSelectionModeBoolean
Added
A boolean value that determines whether the table should be in single selection mode, only allowing one row to be selected at a time.
hx.Table
paginatorPaginator
Removed
The paginator element is no longer used by the table. Use the page(page) to set the page.
hx.Table
setDatadataObject / String / Function
Updated
Added the ability to override the allowHeaderWrap setting for individual columns using the allowWrap property.
hx.Table
page
Added
A method for setting the currently selected page of a table.
0.12.4
hx.TableextendsEventEmitter
Bugfix
Fix sticky header alignment issue when the container resizes.
0.12.3
hx.TableextendsEventEmitter
Updated
Improved the stlying for collapsible rows and for grouped headers.
0.11.0
hx.TableextendsEventEmitter
Updated
Added resize listener to make tables re-render when the container is resized.
Bugfix
Fixed an issue with the collapsibles that was causing the wrong data to be sent out to the collapsible render function. Also renamed hx-collapsible-content to hx-table-collapsible-content to prevent style conflicts.
Bugfix
Fixed an issue with the mobile view where the table does not correctly handle the data being undefined
0.10.0
hx.Table
options
defaultCompareNumber
Added
The default compare function to use when sorting columns. The default is hx.sort.localeCompare()
table.options.defaultCompare = function(a, b) {
  return a > b ? 1 : -1;
}
hx.Table
options
columnCompare
Added
Overrides the compare function for specific columns.
table.options.columnCompare['age'] = function(a, b) {
  return a > b ? 1 : -1;
}
hx.Table
restoreSelected
Added
A method for restoring a set of selected rows to a table that was retrieved using the getSelected method.
When restoring the selected rows, ensure that the sorts/filters that were active when the data was retrieved are restored first as otherwise incorrect rows may be selected.
0.9.0
hx.Table
options
Updated
hx.Table
options
enabledFiltersArray
Updated
hx.Table
options
noDataMessageString
Added
The message to display when there is no data.
hx.Table
options
defaultCellValueLookupAny
Added
When using object for cell data either this should be defined, or cellValueLookup should be defined for every column. This function makes it possible to specify which value in the cell objects to filter and sort by. This can be overridden on a column-by-column basis with options.cellValueLookup.
// table data
data = {
  head : {
    columns: [
      {value: "Column 1"},
      {value: "Column 2"},
      {value: "Column 3"}
    ]
  },
  body: [
    [{value: 1, formatted: "1.0"}, {value: 4, formatted: "4.0"}, {value: 8, formatted: "8.0"}],
    [{value: 7, formatted: "7.0"}, {value: 9, formatted: "9.0"}, {value: 3, formatted: "3.0"}],
    [{value: 1, formatted: "1.0"}, {value: 8, formatted: "8.0"}, {value: 5, formatted: "5.0"}],
    ...
  ]
}

// the table can be instructed to, by default, use the 'value' property of the cell objects for sorting and filtering for:
options.defaultCellValueLookup = function(datum) {
  return datum.value;
}
hx.Table
options
cellValueLookup
Added
Can be set to change the cell value lookup for a specific column:
// table data
data = {
  head : {
    columns: [
      {value: "Column 1"},
      {value: "Column 2"},
      {value: "Column 3"}
    ]
  },
  body: [
    [{value: 1, formatted: "1.0"}, {value: 4, formatted: "4.0"}, {value: 8, formatted: "8.0"}],
    [{value: 7, formatted: "7.0"}, {value: 9, formatted: "9.0"}, {value: 3, formatted: "3.0"}],
    [{value: 1, formatted: "1.0"}, {value: 8, formatted: "8.0"}, {value: 5, formatted: "5.0"}],
    ...
  ]
}

// the table can be instructed to use the 'value' property of the objects for sorting and filtering for 'Column 1' like this:
options.cellValueLookup = {
  'Column 1': function(datum) {
     return datum.value;
  }
}
hx.Table
options
defaultCellSortValueLookupAny
Added
Carries out the same functionality as the defaultCellValueLookup function but only applies when sorting the data.
hx.Table
options
cellSortValueLookup
Added
Works the same way as cellValueLookup but only applies when sorting the data.
hx.Table
options
defaultCellFilterValueLookupAny
Added
Carries out the same functionality as the defaultCellValueLookup function but only applies when filtering the data.
hx.Table
options
cellFilterValueLookup
Added
Works the same way as cellValueLookup but only applies when filtering the data.
hx.Table
options
cellRenderers
Added
Can be set to change the renderer for a given column.
// table data
data = {
  head : {
    columns: [
      {value: "Column 1"},
      {value: "Column 2"},
      {value: "Column 3"}
    ]
  },
  body: [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
    ...
  ]
}

// The table can be instructed to render values in 'Column 1' like this:
options.cellValueLookup = {
  'Column 1': function(datum, element, index) {
     return (datum != 1 ? datum + 's' : datum);
  }
}
hx.Table
options
defaultCellRenderer
Added
Can be set to change the renderer for all the columns in a table.
hx.Table
sort
Removed
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
sort
Added
Optional callback parameter added
hx.Table
renderTable
Removed
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
renderTable
Added
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
addFilter
Removed
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
addFilter
Added
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
removeFilter
Removed
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
removeFilter
Added
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
filter
Removed
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.
hx.Table
filter
Added
An optional callback parameter has been added. This callback gets called once the rendering of the table is complete.