MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getDropdownOptions

Function getDropdownOptions

packages/ui/src/views/canvas/NodeInputHandler.jsx:469–487  ·  view source on GitHub ↗
(inputParam)

Source from the content-addressed store, hash-verified

467 }
468
469 const getDropdownOptions = (inputParam) => {
470 const preLoadOptions = []
471 if (inputParam.loadPreviousNodes) {
472 const nodes = getAvailableNodesForVariable(
473 reactFlowInstance?.getNodes() || [],
474 reactFlowInstance?.getEdges() || [],
475 data.id,
476 inputParam.id
477 )
478 for (const node of nodes) {
479 preLoadOptions.push({
480 name: `{{ ${node.data.id} }}`,
481 label: `{{ ${node.data.id} }}`,
482 description: `Output from ${node.data.id}`
483 })
484 }
485 }
486 return [...preLoadOptions, ...inputParam.options]
487 }
488
489 const getTabValue = (inputParam) => {
490 return inputParam.tabs.findIndex((item) => item.name === data.inputs[`${inputParam.tabIdentifier}_${data.id}`]) >= 0

Callers 1

NodeInputHandlerFunction · 0.85

Calls 1

Tested by

no test coverage detected