Fix variable usage in Search Record workflow action (#16147)
Closes https://github.com/twentyhq/twenty/issues/16141 --------- Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
committed by
GitHub
parent
2f25922f4c
commit
eaac569812
-1
@@ -68,7 +68,6 @@ type FindRecordsFormData = {
|
||||
export type FindRecordsActionFilter = {
|
||||
recordFilterGroups?: RecordFilterGroup[];
|
||||
recordFilters?: RecordFilter[];
|
||||
gqlOperationFilter?: JsonValue;
|
||||
};
|
||||
|
||||
export type FindRecordsActionOrderBy = {
|
||||
|
||||
+1
-11
@@ -10,7 +10,6 @@ import { type FindRecordsActionFilter } from '@/workflow/workflow-steps/workflow
|
||||
import { WorkflowVariablePicker } from '@/workflow/workflow-variables/components/WorkflowVariablePicker';
|
||||
|
||||
import { useRecoilCallback } from 'recoil';
|
||||
import { computeRecordGqlOperationFilter } from 'twenty-shared/utils';
|
||||
|
||||
export const WorkflowFindRecordsFilters = ({
|
||||
objectMetadataItem,
|
||||
@@ -41,25 +40,16 @@ export const WorkflowFindRecordsFilters = ({
|
||||
currentRecordFiltersCallbackState,
|
||||
);
|
||||
|
||||
const gqlOperationFilter = computeRecordGqlOperationFilter({
|
||||
fields: objectMetadataItem.fields,
|
||||
filterValueDependencies: {},
|
||||
recordFilters: currentRecordFilters,
|
||||
recordFilterGroups: currentRecordFilterGroups,
|
||||
});
|
||||
|
||||
const newFilter = {
|
||||
recordFilterGroups: currentRecordFilterGroups,
|
||||
recordFilters: currentRecordFilters,
|
||||
gqlOperationFilter,
|
||||
} as FindRecordsActionFilter;
|
||||
} satisfies FindRecordsActionFilter;
|
||||
|
||||
onChange(newFilter);
|
||||
},
|
||||
[
|
||||
currentRecordFilterGroupsCallbackState,
|
||||
currentRecordFiltersCallbackState,
|
||||
objectMetadataItem.fields,
|
||||
onChange,
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user