The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix wrong label formatting (#9830)
martmull1a42483aa9fa
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsxindex 23397bfd1ba..fe4947fdb6b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdownFieldItems.tsx@@ -115,7 +115,20 @@ export const WorkflowVariablesDropdownFieldItems = ({}};- const headerLabel = currentPath.length === 0 ? step.name : currentPath.at(-1);+ const getHeaderLabel = () => {+ if (currentPath.length === 0) {+ return step.name;+ }++ const subStepName = currentPath.at(-1);++ if (isDefined(subStepName) && isRecordOutputSchema(step.outputSchema)) {+ return step.outputSchema.fields[subStepName].label;+ }++ return subStepName;+ };+const displayedObject = getDisplayedSubStepFields();const options = displayedObject ? Object.entries(displayedObject) : [];@@ -134,7 +147,7 @@ export const WorkflowVariablesDropdownFieldItems = ({onClick={goBack}style={{ position: 'fixed' }}>- <OverflowingTextWithTooltip text={headerLabel} />+ <OverflowingTextWithTooltip text={getHeaderLabel()} /></DropdownMenuHeader><DropdownMenuSearchInputautoFocus