Set initial step if only one root step (#8617)

This commit is contained in:
martmull 2024-11-20 18:38:35 +01:00 committed by GitHub
parent ffbc9ca59c
commit eb66c019f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,9 +43,14 @@ const SearchVariablesDropdown = ({
const availableVariablesInWorkflowStep =
useAvailableVariablesInWorkflowStep();
const initialStep =
availableVariablesInWorkflowStep.length === 1
? availableVariablesInWorkflowStep[0]
: undefined;
const [selectedStep, setSelectedStep] = useState<
StepOutputSchema | undefined
>(undefined);
>(initialStep);
const insertVariableTag = (variable: string) => {
editor.commands.insertVariableTag(variable);