From b58e32c754273a89fba8a892cc8ea0eee80b9a02 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Wed, 4 Dec 2024 16:55:05 -0800 Subject: [PATCH] fix: actually implement env filter for integrations --- .../IntegrationsSection/components/IntegrationsTable.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/IntegrationsPage/components/IntegrationsSection/components/IntegrationsTable.tsx b/frontend/src/views/IntegrationsPage/components/IntegrationsSection/components/IntegrationsTable.tsx index f61624451..81324b754 100644 --- a/frontend/src/views/IntegrationsPage/components/IntegrationsSection/components/IntegrationsTable.tsx +++ b/frontend/src/views/IntegrationsPage/components/IntegrationsSection/components/IntegrationsTable.tsx @@ -132,6 +132,8 @@ export const IntegrationsTable = ({ if (!filters.integrations.includes(integration)) return false; + if (!filters.environmentIds.includes(envId)) return false; + return ( integration.replace("-", " ").toLowerCase().includes(search.trim().toLowerCase()) || secretPath.replace("-", " ").toLowerCase().includes(search.trim().toLowerCase()) || @@ -292,7 +294,7 @@ export const IntegrationsTable = ({ e.preventDefault(); setFilters((prev) => ({ ...prev, - integrations: prev.environmentIds.includes(env.id) + environmentIds: prev.environmentIds.includes(env.id) ? prev.environmentIds.filter((i) => i !== env.id) : [...prev.environmentIds, env.id] }));