Home > @uniformdev/canvas > findParameterInNodeTree
findParameterInNodeTree() function
Walk a Composition or Entry tree to find parameters or fields based on the predicate returning true
Signature:
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
ComponentInstance | EntryData | Array<NodeLocationReference> |
The composition or entry data |
|
predicate |
(parameter: ComponentParameter>) => boolean |
Return true from this function to include the parameter in the results |
Returns:
Example
const textReferences = findParameterInNodeTree( composition, (parameter) => parameter.type === 'text' )