This component is responsible for storing all calculated cells which contain formula expressions (CellValue) and
register for all cell references (CellReference).
CellValue is an object which represents a formula expression. It contains a calculated value of that formula,
an error if applied and cell references. Cell references are CellReference object instances which represent a cell
in a spreadsheet. One CellReference can be assigned to multiple CellValues as a precedent cell. Each cell
modification triggers a search through CellValues that are dependent of the CellReference. After
the match, the cells are marked as 'out of date'. In the next render cycle, all CellValues marked with
that state are recalculated.
Members
-
cellReferencesArray
-
List of all created and registered cell references.
-
dataArray
-
List of all cell values with theirs precedents.
-
hotCore
-
Handsontable instance.
Methods
-
add(cellValue)
-
Add cell value to the collection.
Parameters:
Name Type Description cellValue
CellValue | object Cell value object.
-
getCellAt(row, column){CellValue|null}
-
Get cell value at given row and column index.
Parameters:
Name Type Description row
number Physical row index.
column
number Physical column index.
Returns: {CellValue|null} Returns CellValue instance or
null
if cell not found. -
getDependencies(cellCoord){Array}
-
Get cell dependencies using visual coordinates.
Parameters:
Name Type Description cellCoord
object Visual cell coordinates object.
Returns: {Array}
-
getOutOfDateCells(){Array}
-
Get all out of date cells.
Returns: {Array}
-
registerCellRef(cellReference)
-
Register cell reference to the collection.
Parameters:
Name Type Description cellReference
CellReference | object Cell reference object.
-
remove(cellValue)
-
Remove cell value from the collection.
Parameters:
Name Type Description cellValue
CellValue | object | Array Cell value object.
-
removeCellRefsAtRange(start, end){Array}
-
Remove cell references from the collection.
Parameters:
Name Type Description start
object Start visual coordinate.
end
object End visual coordinate.
Returns: {Array} Returns removed cell references.
-
reset()
-
Reset matrix data.