Skip to content

Commit

Permalink
[frontend] fix search input disappears when going back to list (#6161)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkha committed Feb 28, 2024
1 parent 4ded3bf commit 4dd66dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
"Campaigns": "Campaigns",
"Arsenal": "Arsenal",
"Variants": "Variants",
"Malwares": "Malwares",
"Malwares": "Malware",
"Channels": "Channels",
"Tools": "Tools",
"Vulnerabilities": "Vulnerabilities",
Expand Down Expand Up @@ -2675,4 +2675,4 @@
"Strategic": "Strategic",
"Link created": "Link created",
"Public dashboard": "Public dashboard"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const useLocalStorage = (
if (isEmptyField(value)) {
value = initialValue;
}
if (value?.filters?.filters.length === 0) {
if (value?.filters?.filters.length === 0 && !value.searchTerm && value?.filters?.filterGroups.length === 0) {
value = initialValue;
}
// Need to clear the local storage ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test('Check navigation on all pages', async ({ page }) => {

// Checking Arsenal menu
await leftBarPage.clickOnMenu('Arsenal');
await leftBarPage.expectPage('Arsenal', 'Malwares');
await leftBarPage.expectPage('Arsenal', 'Malware');
await leftBarPage.expectPage('Arsenal', 'Channels');
await leftBarPage.expectPage('Arsenal', 'Tools');
await leftBarPage.expectPage('Arsenal', 'Vulnerabilities');
Expand Down

0 comments on commit 4dd66dc

Please sign in to comment.