From 9551152eeb6a674bb1b7dab3db6e81ea8a809107 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Mon, 11 Aug 2025 10:28:13 +0530 Subject: [PATCH] When the data is not loaded then the filter show "No Filter found" message. --- src/pages/Directory/DirectoryPageHeader.jsx | 195 +++++++++++--------- 1 file changed, 111 insertions(+), 84 deletions(-) diff --git a/src/pages/Directory/DirectoryPageHeader.jsx b/src/pages/Directory/DirectoryPageHeader.jsx index 81074dde..f5f4fdde 100644 --- a/src/pages/Directory/DirectoryPageHeader.jsx +++ b/src/pages/Directory/DirectoryPageHeader.jsx @@ -318,54 +318,60 @@ const DirectoryPageHeader = ({ whiteSpace: "normal" }} > -
- {/* Created By */} -
-
-

Created By

-
- {allCreators.map((name, idx) => ( -
- handleToggleCreator(name)} - style={{ width: "1rem", height: "1rem" }} - /> - -
- ))} + {allCreators.length === 0 && filteredOrganizations.length === 0 ? ( +
+ No filter found
- - {/* Organization */} -
-
-

Organization

-
- {filteredOrganizations.map((org, idx) => ( -
- handleToggleOrg(org)} - style={{ width: "1rem", height: "1rem" }} - /> - + ) : ( +
+ {/* Created By */} +
+
+

Created By

- ))} -
-
+ {allCreators.map((name, idx) => ( +
+ handleToggleCreator(name)} + style={{ width: "1rem", height: "1rem" }} + /> + +
+ ))} +
+ {/* Organization */} +
+
+

Organization

+
+ {filteredOrganizations.map((org, idx) => ( +
+ handleToggleOrg(org)} + style={{ width: "1rem", height: "1rem" }} + /> + +
+ ))} +
+
+ )}
+ {/* Sticky Footer Buttons */}

Filter by

-
-
-

Buckets

-
- {filteredBuckets.map(({ id, name }) => ( -
- handleTempBucketChange(id)} - style={{ width: "1rem", height: "1rem" }} - /> - -
- ))} + {filteredBuckets.length === 0 && filteredCategories.length === 0 ? ( +
+ No filter found +
+ ) : ( +
+
+

Buckets

+
+ {filteredBuckets.map(({ id, name }) => ( +
+ handleTempBucketChange(id)} + style={{ width: "1rem", height: "1rem" }} + /> + +
+ ))} +
+
+ +
+

Categories

+
+ {filteredCategories.map(({ id, name }) => ( +
+ handleTempCategoryChange(id)} + style={{ width: "1rem", height: "1rem" }} + /> + +
+ ))} +
-
-

Categories

-
- {filteredCategories.map(({ id, name }) => ( -
- handleTempCategoryChange(id)} - style={{ width: "1rem", height: "1rem" }} - /> - -
- ))} -
-
-
+ )}
+
)}