mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
Set initial step if only one root step (#8617)
This commit is contained in:
parent
ffbc9ca59c
commit
eb66c019f5
@ -43,9 +43,14 @@ const SearchVariablesDropdown = ({
|
|||||||
const availableVariablesInWorkflowStep =
|
const availableVariablesInWorkflowStep =
|
||||||
useAvailableVariablesInWorkflowStep();
|
useAvailableVariablesInWorkflowStep();
|
||||||
|
|
||||||
|
const initialStep =
|
||||||
|
availableVariablesInWorkflowStep.length === 1
|
||||||
|
? availableVariablesInWorkflowStep[0]
|
||||||
|
: undefined;
|
||||||
|
|
||||||
const [selectedStep, setSelectedStep] = useState<
|
const [selectedStep, setSelectedStep] = useState<
|
||||||
StepOutputSchema | undefined
|
StepOutputSchema | undefined
|
||||||
>(undefined);
|
>(initialStep);
|
||||||
|
|
||||||
const insertVariableTag = (variable: string) => {
|
const insertVariableTag = (variable: string) => {
|
||||||
editor.commands.insertVariableTag(variable);
|
editor.commands.insertVariableTag(variable);
|
||||||
|
Loading…
Reference in New Issue
Block a user