From 2cf510764d02c19c1668e3af78feb6f4fe6b49b9 Mon Sep 17 00:00:00 2001 From: Pranita Fulsundar Date: Fri, 25 Apr 2025 20:28:03 +0530 Subject: [PATCH] fix(ui): data assets order for search in explore page (#20963) * fix: asset order and sort order for search * revert sort order change --- .../ExploreV1/ExploreV1.component.tsx | 4 ++- .../resources/ui/src/utils/SearchClassBase.ts | 28 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx index 024c9d84816..1cddfc77b7a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreV1.component.tsx @@ -210,7 +210,9 @@ const ExploreV1: React.FC = ({ const exploreLeftPanel = useMemo(() => { if (tabItems.length === 0) { - return ( + return loading ? ( + + ) : ( { return { - [SearchIndex.TABLE]: { - label: i18n.t('label.table-plural'), - sortingFields: tableSortingFields, - sortField: INITIAL_SORT_FIELD, - path: ExplorePageTabs.TABLES, - icon: TableIcon, - }, - [SearchIndex.STORED_PROCEDURE]: { - label: i18n.t('label.stored-procedure-plural'), - sortingFields: entitySortingFields, - sortField: INITIAL_SORT_FIELD, - path: ExplorePageTabs.STORED_PROCEDURE, - icon: IconStoredProcedure, - }, [SearchIndex.DATABASE]: { label: i18n.t('label.database-plural'), sortingFields: entitySortingFields, @@ -385,6 +371,20 @@ class SearchClassBase { path: ExplorePageTabs.DATABASE_SCHEMA, icon: SchemaIcon, }, + [SearchIndex.TABLE]: { + label: i18n.t('label.table-plural'), + sortingFields: tableSortingFields, + sortField: INITIAL_SORT_FIELD, + path: ExplorePageTabs.TABLES, + icon: TableIcon, + }, + [SearchIndex.STORED_PROCEDURE]: { + label: i18n.t('label.stored-procedure-plural'), + sortingFields: entitySortingFields, + sortField: INITIAL_SORT_FIELD, + path: ExplorePageTabs.STORED_PROCEDURE, + icon: IconStoredProcedure, + }, [SearchIndex.DASHBOARD]: { label: i18n.t('label.dashboard-plural'), sortingFields: entitySortingFields,