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:
parent
b94fcb11e5
commit
618e4dc59f
1 changed files with 13 additions and 13 deletions
|
|
@ -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> {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue