When you use use or usePre, you're just pushing components into an array of components.
If you need to manipulate that array wholesale, you can inspect, modify or reassign the whole component list by using the externalComponents or externalComponentsPre getter / setters on the grid.
grid.externalComponents() // => the current components
grid.externalComponents([componentA, componentB]) // => overriding the current components
Motivation and Context
In some contexts (for example, when proxying configuration on higher level components) it becomes tricky to update the component stack.
Calling use or usePre becomes fragile -- if done more than once, the components will be incorrectly stacked and will run multiple times.
With this PR, components can safely be reconfigured or rearranged as needed.
How Was This Tested?
On a rig offline.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My change follows the style of this project
[x] My change requires a change to the documentation
Description
From the proposed documentation,
Motivation and Context
In some contexts (for example, when proxying configuration on higher level components) it becomes tricky to update the component stack. Calling
use
orusePre
becomes fragile -- if done more than once, the components will be incorrectly stacked and will run multiple times.With this PR, components can safely be reconfigured or rearranged as needed.
How Was This Tested?
On a rig offline.
Types of changes
Checklist: