This is an automated email from the ASF dual-hosted git repository.

ppawar pushed a commit to branch ATLAS-5110
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit dfcf175a25cd76c8fe9cd152a1efc409d18c8876
Author: Prasad Pawar <prasad.pa...@freestoneinfotech.com>
AuthorDate: Mon Sep 22 12:17:21 2025 +0530

    ATLAS-5110: [REACT UI] Incorrect entities are being displayed for Empty 
entity types
---
 dashboard/src/views/SearchResult/SearchResult.tsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dashboard/src/views/SearchResult/SearchResult.tsx 
b/dashboard/src/views/SearchResult/SearchResult.tsx
index aa1cd0921..a6574e1d2 100644
--- a/dashboard/src/views/SearchResult/SearchResult.tsx
+++ b/dashboard/src/views/SearchResult/SearchResult.tsx
@@ -231,11 +231,17 @@ const SearchResult = ({ classificationParams, 
glossaryTypeParams }: any) => {
         }
         if (!dataLength) {
           setIsEmptyData(true);
+          setSearchData({ entities: [], referredEntities: {} });
+          setTotalCount(0);
+          setPageCount(0);
           setLoader(false);
         } else {
+          setIsEmptyData(false);
           setSearchData(searchResp.data);
           setTotalCount(totalCount || 0);
-          setPageCount(Math.ceil(totalCount / pagination.pageSize));
+          setPageCount(
+            Math.ceil((totalCount || 0) / ((pagination && pagination.pageSize) 
|| 1))
+          );
           setLoader(false);
         }
       } catch (error: any) {

Reply via email to