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.
This commit is contained in:
Shekar Siri 2025-03-15 11:42:14 +01:00 committed by GitHub
parent b94fcb11e5
commit 618e4dc59f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,18 +28,18 @@ export const checkValues = (key: any, value: any) => {
}; };
export const filterMap = ({ export const filterMap = ({
category, category,
value, value,
key, key,
operator, operator,
sourceOperator, sourceOperator,
source, source,
custom, custom,
isEvent, isEvent,
filters, filters,
sort, sort,
order order
}: any) => ({ }: any) => ({
value: checkValues(key, value), value: checkValues(key, value),
custom, custom,
type: category === FilterCategory.METADATA ? FilterKey.METADATA : key, type: category === FilterCategory.METADATA ? FilterKey.METADATA : key,
@ -254,7 +254,7 @@ class SearchStore {
this.savedSearch = new SavedSearch({}); this.savedSearch = new SavedSearch({});
sessionStore.clearList(); sessionStore.clearList();
void this.fetchSessions(true); // void this.fetchSessions(true);
} }
async checkForLatestSessionCount(): Promise<void> { async checkForLatestSessionCount(): Promise<void> {