This is an automated email from the ASF dual-hosted git repository.
ppawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 97e85542b ATLAS-5110: [REACT UI] Incorrect entities are being
displayed for Empty entity types (#448)
97e85542b is described below
commit 97e85542b40345cf8e748245e2f14892035a0248
Author: Prasad Pawar <[email protected]>
AuthorDate: Thu Sep 25 17:47:20 2025 +0530
ATLAS-5110: [REACT UI] Incorrect entities are being displayed for Empty
entity types (#448)
---
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) {