From 5f4610d66193085be1ec97c49e7d0a78cd981549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Fri, 18 Oct 2024 11:24:14 +0200 Subject: [PATCH 1/3] show the tooltip only once with the new backend logic --- src/pages/Search/AdvancedSearchFilters.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Search/AdvancedSearchFilters.tsx b/src/pages/Search/AdvancedSearchFilters.tsx index 54b62a61724d..b3ae202e54ed 100644 --- a/src/pages/Search/AdvancedSearchFilters.tsx +++ b/src/pages/Search/AdvancedSearchFilters.tsx @@ -263,7 +263,8 @@ function AdvancedSearchFilters() { return; } - if (isEmptyObject(savedSearches)) { + // We only want to show the tooltip once, the NVP will be empty if the user has not saved a search yet + if (!savedSearches) { SearchActions.showSavedSearchRenameTooltip(); } From 71b9b5aa3662d4bd1a17ff6a873829172f9e22ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Fri, 18 Oct 2024 11:33:17 +0200 Subject: [PATCH 2/3] update comment --- src/pages/Search/AdvancedSearchFilters.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Search/AdvancedSearchFilters.tsx b/src/pages/Search/AdvancedSearchFilters.tsx index b3ae202e54ed..e61553a16d16 100644 --- a/src/pages/Search/AdvancedSearchFilters.tsx +++ b/src/pages/Search/AdvancedSearchFilters.tsx @@ -263,7 +263,7 @@ function AdvancedSearchFilters() { return; } - // We only want to show the tooltip once, the NVP will be empty if the user has not saved a search yet + // We only want to show the tooltip once, the NVP will not be set if the user has not saved a search yet if (!savedSearches) { SearchActions.showSavedSearchRenameTooltip(); } From f6ec00913bcebbe49fede156551e4b89bc91f442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Fri, 18 Oct 2024 11:35:55 +0200 Subject: [PATCH 3/3] remove unneeded import --- src/pages/Search/AdvancedSearchFilters.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Search/AdvancedSearchFilters.tsx b/src/pages/Search/AdvancedSearchFilters.tsx index e61553a16d16..df235eccc622 100644 --- a/src/pages/Search/AdvancedSearchFilters.tsx +++ b/src/pages/Search/AdvancedSearchFilters.tsx @@ -27,7 +27,6 @@ import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {SearchAdvancedFiltersForm} from '@src/types/form'; import type {CardList, PersonalDetailsList, Report} from '@src/types/onyx'; -import {isEmptyObject} from '@src/types/utils/EmptyObject'; const baseFilterConfig = { date: {