From 618e4dc59f16091a69d9e3333b3d79c6320cc92f Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Sat, 15 Mar 2025 11:42:14 +0100 Subject: [PATCH] refactor(searchStore): reformat filterMap function parameters (#3166) - Reformat the parameters of the filterMap function for better readability. - Comment out the fetchSessions call in clearSearch method to avoid unnecessary session fetch. --- frontend/app/mstore/searchStore.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/app/mstore/searchStore.ts b/frontend/app/mstore/searchStore.ts index bff304325..da92fedd6 100644 --- a/frontend/app/mstore/searchStore.ts +++ b/frontend/app/mstore/searchStore.ts @@ -28,18 +28,18 @@ export const checkValues = (key: any, value: any) => { }; export const filterMap = ({ - category, - value, - key, - operator, - sourceOperator, - source, - custom, - isEvent, - filters, - sort, - order - }: any) => ({ + category, + value, + key, + operator, + sourceOperator, + source, + custom, + isEvent, + filters, + sort, + order +}: any) => ({ value: checkValues(key, value), custom, type: category === FilterCategory.METADATA ? FilterKey.METADATA : key, @@ -254,7 +254,7 @@ class SearchStore { this.savedSearch = new SavedSearch({}); sessionStore.clearList(); - void this.fetchSessions(true); + // void this.fetchSessions(true); } async checkForLatestSessionCount(): Promise {