@@ -26,20 +26,21 @@ import {TopicInfo} from './TopicInfo';
2626interface OverviewProps {
2727 type ?: EPathType ;
2828 path : string ;
29+ database : string ;
2930}
3031
31- function Overview ( { type, path} : OverviewProps ) {
32+ function Overview ( { type, path, database } : OverviewProps ) {
3233 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
3334
3435 const isEntityWithMergedImpl = isEntityWithMergedImplementation ( type ) ;
3536
3637 // shallowEqual prevents rerenders when new schema data is loaded
3738 const mergedChildrenPaths = useTypedSelector (
38- ( state ) => selectSchemaMergedChildrenPaths ( state , path , type ) ,
39+ ( state ) => selectSchemaMergedChildrenPaths ( state , path , type , database ) ,
3940 shallowEqual ,
4041 ) ;
4142
42- let paths : string [ ] | typeof skipToken = skipToken ;
43+ let paths : string [ ] = [ ] ;
4344 if ( ! isEntityWithMergedImpl ) {
4445 paths = [ path ] ;
4546 } else if ( mergedChildrenPaths ) {
@@ -50,13 +51,13 @@ function Overview({type, path}: OverviewProps) {
5051 currentData,
5152 isFetching,
5253 error : overviewError ,
53- } = overviewApi . useGetOverviewQuery ( paths , {
54+ } = overviewApi . useGetOverviewQuery ( paths . length ? { paths , database } : skipToken , {
5455 pollingInterval : autoRefreshInterval ,
5556 } ) ;
5657 const overviewLoading = isFetching && currentData === undefined ;
5758 const { data : rawData , additionalData} = currentData || { } ;
5859
59- const { error : schemaError } = useGetSchemaQuery ( { path} ) ;
60+ const { error : schemaError } = useGetSchemaQuery ( { path, database } ) ;
6061
6162 const entityLoading = overviewLoading ;
6263 const entityNotReady = isEntityWithMergedImpl && ! mergedChildrenPaths ;
0 commit comments