diff --git a/public/components/SQLPage/sql_catalog_tree/s3_tree.tsx b/public/components/SQLPage/sql_catalog_tree/s3_tree.tsx index fe32426..1f449b2 100644 --- a/public/components/SQLPage/sql_catalog_tree/s3_tree.tsx +++ b/public/components/SQLPage/sql_catalog_tree/s3_tree.tsx @@ -60,17 +60,17 @@ export const S3Tree = ({ dataSource, updateSQLQueries, refreshTree }: S3TreeProp const { loadStatus: loadDatabasesStatus, startLoading: startDatabasesLoading, - stopLoading: _stopDatabasesLoading, + stopLoading: stopDatabasesLoading, } = catalogCacheRefs.useLoadDatabasesToCache(); const { loadStatus: loadTablesStatus, startLoading: startLoadingTables, - stopLoading: _stopLoadingTables, + stopLoading: stopLoadingTables, } = catalogCacheRefs.useLoadTablesToCache(); const { loadStatus: loadAccelerationsStatus, startLoading: startLoadingAccelerations, - stopLoading: _stopLoadingAccelerations, + stopLoading: stopLoadingAccelerations, } = catalogCacheRefs.useLoadAccelerationsToCache(); const updateDatabaseState = (databaseName: string, isLoading: boolean, values?: TreeItem[]) => { @@ -274,6 +274,14 @@ export const S3Tree = ({ dataSource, updateSQLQueries, refreshTree }: S3TreeProp } }, [isObjectLoading]); + useEffect(() => { + return () => { + stopDatabasesLoading(); + stopLoadingTables(); + stopLoadingAccelerations(); + }; + }, []); + const treeLoadingStateRenderer = (