Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend] fix search input disappears when going back to list #6161

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See with @yassine-ouaamou, Malware did not take "s" in plural

"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