Optionalproperties: GradumObserverProperties<DataType, ComponentType, DataKeyType> = {}
Initialization options and lifecycle callbacks.
Create a GradumObserver.
By default, onUpdated updates the data of the mapped instance if it exposes a GradumModel model,
or data / dataId fields. onDeleted removes the instance from the map and the DOM.
Protected ReadonlynestedProtected_ReadonlyonReadonlyonReadonlyonReadonlyonReadonlyonWhether the observer has been initialized (i.e. initialize has been called).
Function
get
Ordered path from outermost to innermost key.
The stored value, or undefined if not found.
Function
getFlat
A flat key produced by flattenKey.
Optionaldepth: number
Optional depth of the entry for numerical flat keys.
The stored value, or undefined if not found.
Function
getKey
The value to locate.
The key path, or undefined if not found.
Function
getKeys
The value to locate.
Array of key paths.
Function
getFlatKey
The value to query.
The flat key, or undefined if not found.
Function
set
The value to store.
Ordered path from outermost to innermost key.
Function
setFlat
The value to store.
A flat key produced by flattenKey.
Optionaldepth: number
Optional depth of the entry for numerical flat keys.
Function
has
Ordered path from outermost to innermost key.
Function
hasFlat
A flat key produced by flattenKey.
Optionaldepth: number
Optional depth of the entry for numerical flat keys.
Function
getEntriesAt
Path to the subtree root.
Function
getValuesAt
Path to the parent node.
Function
getPathsAt
Path to the subtree root.
Function
flattenKey
The key path to serialize.
The flat key, or undefined if the path is invalid.
Function
scopeKey
The flat key to convert.
Optionaldepth: number
Optional depth of the entry for numerical flat keys.
The key path, or undefined if conversion fails.
Convert a flat key back into a key path. Reverses flattenKey.
"k0|k1|k2" becomes [k0, k1, k2].ProtectedfindOptionaltarget: ComponentTypeProtectedgetFunction
keyChanged
The key path that changed.
The new value at that path.
Optionaldeleted: boolean = false
Whether the entry was deleted.
GradumObserver
Description
Generic observer that keeps a set of component instances organized by key path. Useful to maintain UI components or other per-entry objects synchronized with a data source (GradumModel).