mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Implement dropdown
This commit is contained in:
parent
7012d9bb9c
commit
90fa0b45ec
|
@ -22,10 +22,9 @@ export class ExecuteWorkflowTrigger implements INodeType {
|
|||
eventTriggerDescription: '',
|
||||
maxNodes: 1,
|
||||
defaults: {
|
||||
name: 'Execute Workflow Trigger',
|
||||
name: 'Workflow Input Trigger',
|
||||
color: '#ff6d5a',
|
||||
},
|
||||
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
|
@ -51,6 +50,26 @@ export class ExecuteWorkflowTrigger implements INodeType {
|
|||
],
|
||||
default: 'worklfow_call',
|
||||
},
|
||||
{
|
||||
displayName: 'Input Source',
|
||||
name: 'inputSource',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
name: 'Using fields below',
|
||||
value: 'fields',
|
||||
description: 'Provide via UI',
|
||||
},
|
||||
{
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
name: 'Using JSON',
|
||||
value: 'json',
|
||||
description: 'Provide via JSON schema',
|
||||
},
|
||||
],
|
||||
default: 'fields',
|
||||
},
|
||||
{
|
||||
displayName: 'Workflow Inputs',
|
||||
name: WORKFLOW_INPUTS,
|
||||
|
@ -63,7 +82,7 @@ export class ExecuteWorkflowTrigger implements INodeType {
|
|||
sortable: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: { '@version': [{ _cnd: { gte: 1.1 } }] },
|
||||
show: { '@version': [{ _cnd: { gte: 1.1 } }], inputSource: ['fields'] },
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
|
@ -78,6 +97,7 @@ export class ExecuteWorkflowTrigger implements INodeType {
|
|||
default: '',
|
||||
placeholder: 'e.g. fieldName',
|
||||
description: 'Name of the field',
|
||||
noDataExpression: true,
|
||||
},
|
||||
// {
|
||||
// displayName: 'Type',
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { IExecuteFunctions, INode, INodeExecutionData } from 'n8n-workflow'
|
|||
import { ExecuteWorkflowTrigger } from '../ExecuteWorkflowTrigger.node';
|
||||
|
||||
describe('ExecuteWorkflowTrigger', () => {
|
||||
it('should return its input data', async () => {
|
||||
it('should return its input data on V1', async () => {
|
||||
const mockInputData: INodeExecutionData[] = [
|
||||
{ json: { item: 0, foo: 'bar' } },
|
||||
{ json: { item: 1, foo: 'quz' } },
|
||||
|
|
Loading…
Reference in a new issue