These functions return a cell's value or an array of cell values to be used in getter and setter functions.
Note: These helpers are the helper functions that you can supply at initialization that are wrapped to return cell values instead of the cells themselves. These helpers should not be used to supply cell arguments to setter helpers.
-
row(cellName)
Returns a single cell's value from the current row by name
-
prevRow(cellName)
Returns a single cell's value from the previous row by name
-
rowsWhere(criteria, cellName)
Returns a cell's value from each row by name where criteria matches the metadata attributes found on each row. For example if I call
rowsWhere({ color: red, even: true }, 'count')
it will return thecount
cell from every row that has at least thecolor: red
andeven: true
properties in the row'smeta
object.Note: ALL properties given in
criteria
must match for the row to match the rule and return it's cell.
These functions update cells based on the given values.
-
set(value, cells)
Updates all cells with the given value.
cells
can either be a single cell or an array of cells -
spread(value, cells)
Increments or decrements an array of cells proportionally to each other
-
data.cells
This in an object that contains pure copies of the cell helper functions that return cells instead of cell values. These should be used for getting references to cells to pass to setter helper functions.
-
meta(name)
Returns the meta property for the given row. For example, if the metadata for my current row is:
{ a: 123, b: 'hello' }
calling
meta('a')
will return123
for all cells in that row. -
preLink()
Returns a reference to the preLink data returned by the
preLink
function provided at initialization.