diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilterBody.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilterBody.tsx
index 2a5796305c..b035683c96 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilterBody.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilterBody.tsx
@@ -10,9 +10,7 @@ import { useChildStepFiltersAndChildStepFilterGroups } from '@/workflow/workflow
import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/workflow-actions/filter-action/states/context/WorkflowStepFilterContext';
import { rootLevelStepFilterGroupComponentSelector } from '@/workflow/workflow-steps/workflow-actions/filter-action/states/rootLevelStepFilterGroupComponentSelector';
import { isStepFilterGroupChildAStepFilterGroup } from '@/workflow/workflow-steps/workflow-actions/filter-action/utils/isStepFilterGroupChildAStepFilterGroup';
-import { useAvailableVariablesInWorkflowStep } from '@/workflow/workflow-variables/hooks/useAvailableVariablesInWorkflowStep';
import styled from '@emotion/styled';
-import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
const StyledContainer = styled.div`
@@ -29,10 +27,6 @@ const StyledChildContainer = styled.div`
width: 100%;
`;
-const StyledDangerContainer = styled.div`
- color: ${({ theme }) => theme.font.color.danger};
-`;
-
type WorkflowEditActionFilterBodyProps = {
action: WorkflowFilterAction;
actionOptions:
@@ -49,8 +43,6 @@ export const WorkflowEditActionFilterBody = ({
action,
actionOptions,
}: WorkflowEditActionFilterBodyProps) => {
- const { t } = useLingui();
-
const rootStepFilterGroup = useRecoilComponentValueV2(
rootLevelStepFilterGroupComponentSelector,
);
@@ -77,22 +69,6 @@ export const WorkflowEditActionFilterBody = ({
});
};
- const availableVariablesInWorkflowStep = useAvailableVariablesInWorkflowStep(
- {},
- );
-
- const noAvailableVariables = availableVariablesInWorkflowStep.length === 0;
-
- if (noAvailableVariables) {
- return (
-
-
- {t`No Available Step Outputs`}
-
-
- );
- }
-
return (
(variableName: string) => {
@@ -103,9 +111,29 @@ export const WorkflowStepFilterFieldSelect = ({
});
const isSelectedFieldNotFound = !isDefined(variableLabel);
- const label = isSelectedFieldNotFound ? t`No Field Selected` : variableLabel;
+ const label = isSelectedFieldNotFound
+ ? t`Select a field from a previous step`
+ : variableLabel;
const dropdownId = `step-filter-field-${stepFilter.id}`;
+ if (noAvailableVariables) {
+ return (
+
+ }
+ dropdownComponents={[]}
+ />
+ );
+ }
+
return (
}
/>