This mixin provides a way for nested components inside the component using it to use and update the shared processesData component in a reactive way
Members
(inner) changeCallbacks
The callbacks other components can provide to react to changes on an entry
- Source:
(inner) executionQueue
Used to make sure that the processesData is only updated by one function at a time
- Source:
(inner) initCallbacks
The callbacks other components can provide to react to new entries being added
- Source:
(inner) reactiveData
Provide the processesData inside an object so injecting components can react to changes
- Source:
Methods
handleChanges(currentData, currentChanges) → {Object}
Will trigger change handlers with the current change and then recursively for all resulting changes until there is no new change
BEWARE: this can lead to infinite cycles if some components have a cyclical change dependency
Parameters:
Name | Type | Description |
---|---|---|
currentData |
Object | the current state of the entry |
currentChanges |
Object | the changes to apply |
- Source:
Returns:
the result of all the changes applied to the existing entry
- Type
- Object
setProcessesData(entries)
Will set processesData making sure that every entry contains an id that makes it identifyable
Parameters:
Name | Type | Description |
---|---|---|
entries |
Array | the entries the new processesData should be initialized with |
- Source:
updateProcessesData(index, changes)
Will change the entry at the given index in a way that vue can react to
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | the index of the element inside the processesData array |
changes |
Object | the changes to make |