React Data Grid IndexMap
Table of contents
Description
Map for storing mappings from an index to a value.
Methods
clear
Source code (opens new window)indexMap.clear()
Clear all values to the defaults.
destroy
Source code (opens new window)indexMap.destroy()
Destroys the Map instance.
getLength
Source code (opens new window)indexMap.getLength() ⇒ number
Get length of the index map.
getValueAtIndex
Source code (opens new window)indexMap.getValueAtIndex(index) ⇒ *
Get value for the particular index.
Param | Type | Description |
---|---|---|
index | number | Index for which value is got. |
getValues
Source code (opens new window)indexMap.getValues() ⇒ Array
Get full list of values for particular indexes.
setValueAtIndex
Source code (opens new window)indexMap.setValueAtIndex(index, value) ⇒ boolean
Set new value for the particular index.
Param | Type | Description |
---|---|---|
index | number | The index. |
value | * | The value to save. Note: Please keep in mind that it is not possible to set value beyond the map (not respecting already set map's size). Please use the setValues method when you would like to extend the map. Note: Please keep in mind that change hook triggered by the method may not update cache of a collection immediately. |
setValues
Source code (opens new window)indexMap.setValues(values)
Set new values for particular indexes.
Note: Please keep in mind that change
hook triggered by the method may not update cache of a collection immediately.
Param | Type | Description |
---|---|---|
values | Array | List of set values. |