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

ParameterTypeDescription
dataComponentInstance | EntryData | Array<NodeLocationReference>The composition or entry data
predicate(parameter: ComponentParameter>) => booleanReturn true from this function to include the parameter in the results

Returns:

FindInNodeTreeReference[]

Example

const textReferences = findParameterInNodeTree( composition, (parameter) => parameter.type === 'text' )