A type alias for the data model cell regions.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when cells are changed in-place.
A type alias for the args objects of the changed
signal.
A type alias for the data model column regions.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when columns are inserted or removed.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when columns are moved.
The metadata for a column in a data model.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when the model has changed in a fashion that cannot be easily
expressed by the other args object types.
This is the "big hammer" approach, and will cause any associated data grid to perform a full reset. The other changed args types should be used whenever possible.
A type alias for the data model row regions.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when rows are inserted or removed.
An arguments object for the changed
signal.
Data models should emit the changed
signal with this args object
type when rows are moved.
A singleton empty metadata object.
A signal emitted when the data model has changed.
Get the column count for a region in the data model.
The column region of interest.
This method is called often, and so should be efficient.
Get the data value for a cell in the data model.
The cell region of interest.
The row index of the cell of interest.
The column index of the cell of interest.
The data value for the specified cell.
The returned data should be treated as immutable.
This method is called often, and so should be efficient.
Emit the changed
signal for the data model.
Subclasses should call this method whenever the data model has changed so that attached data grids can update themselves.
Get the merged cell group corresponding to a region and index number.
the cell region of cell group.
the group index of the cell group.
a cell group.
Get the count of merged cell groups pertaining to a given cell region.
the target cell region.
Get the metadata for a cell in the data model.
The cell region of interest.
The row index of the cell of interest.
The column index of the cell of interest.
The metadata for the specified cell.
The returned metadata should be treated as immutable.
This method is called often, and so should be efficient.
The default implementation returns {}
.
Generated using TypeDoc
An object which provides the data for a data grid. The namespace for the
DataModel
class statics.Notes
If the predefined data models are insufficient for a particular use case, a custom model can be defined which derives from this class.