@@ -42,6 +42,7 @@ import generatePath from 'lib/generatePath';
4242import { withRouter } from 'lib/withRouter' ;
4343import { get } from 'lib/AJAX' ;
4444import BrowserFooter from './BrowserFooter.react' ;
45+ import LoaderDots from 'components/LoaderDots/LoaderDots.react' ;
4546
4647// The initial and max amount of rows fetched by lazy loading
4748const BROWSER_LAST_LOCATION = 'brower_last_location' ;
@@ -898,6 +899,10 @@ class Browser extends DashboardView {
898899
899900 async fetchParseData ( source , filters ) {
900901 const { useMasterKey, skip, limit } = this . state ;
902+ this . setLoading ( true ) ;
903+ this . setState ( {
904+ data : null ,
905+ } )
901906 const query = await queryFromFilters ( source , filters ) ;
902907 const sortDir = this . state . ordering [ 0 ] === '-' ? '-' : '+' ;
903908 const field = this . state . ordering . substr ( sortDir === '-' ? 1 : 0 ) ;
@@ -927,6 +932,8 @@ class Browser extends DashboardView {
927932 this . setState ( { isUnique, uniqueField } ) ;
928933
929934 const data = await promise ;
935+
936+ this . setLoading ( false ) ;
930937 return data ;
931938 }
932939
@@ -2089,6 +2096,7 @@ class Browser extends DashboardView {
20892096 classwiseCloudFunctions = { this . state . classwiseCloudFunctions }
20902097 callCloudFunction = { this . fetchAggregationPanelData }
20912098 isLoadingCloudFunction = { this . state . isLoading }
2099+ isLoading = { this . state . isLoading }
20922100 setLoading = { this . setLoading }
20932101 AggregationPanelData = { this . state . AggregationPanelData }
20942102 setAggregationPanelData = { this . setAggregationPanelData }
0 commit comments