From ba1c09477531dca5204ac016bd874147dd66be7d Mon Sep 17 00:00:00 2001 From: Thomas Trompette Date: Tue, 19 Nov 2024 18:12:08 +0100 Subject: [PATCH] Fix select filter eq (#8594) Fix https://discord.com/channels/1130383047699738754/1308384008043757640/1308384008043757640 --- .../object-record/graphql/types/RecordGqlOperationFilter.ts | 1 + .../record-filter/utils/isMatchingSelectFilter.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlOperationFilter.ts b/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlOperationFilter.ts index df189bd62a..1d4fb29bc9 100644 --- a/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlOperationFilter.ts +++ b/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlOperationFilter.ts @@ -109,6 +109,7 @@ export type PhonesFilter = { export type SelectFilter = { is?: IsFilter; in?: string[]; + eq?: string; }; export type MultiSelectFilter = { diff --git a/packages/twenty-front/src/modules/object-record/record-filter/utils/isMatchingSelectFilter.ts b/packages/twenty-front/src/modules/object-record/record-filter/utils/isMatchingSelectFilter.ts index c564f63a14..47615ae7b2 100644 --- a/packages/twenty-front/src/modules/object-record/record-filter/utils/isMatchingSelectFilter.ts +++ b/packages/twenty-front/src/modules/object-record/record-filter/utils/isMatchingSelectFilter.ts @@ -18,6 +18,9 @@ export const isMatchingSelectFilter = ({ return value !== null; } } + case selectFilter.eq !== undefined: { + return value === selectFilter.eq; + } default: { throw new Error( `Unexpected value for select filter : ${JSON.stringify(selectFilter)}`,