Skip to content

Commit 62d7aec

Browse files
authored
fix: Data loading indicator not showing when using pagination (#2768)
1 parent e3bf21d commit 62d7aec

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/dashboard/Data/Browser/Browser.react.js

+7
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,10 @@ class Browser extends DashboardView {
898898

899899
async fetchParseData(source, filters) {
900900
const { useMasterKey, skip, limit } = this.state;
901+
this.setLoading(true);
902+
this.setState({
903+
data: null,
904+
})
901905
const query = await queryFromFilters(source, filters);
902906
const sortDir = this.state.ordering[0] === '-' ? '-' : '+';
903907
const field = this.state.ordering.substr(sortDir === '-' ? 1 : 0);
@@ -927,6 +931,8 @@ class Browser extends DashboardView {
927931
this.setState({ isUnique, uniqueField });
928932

929933
const data = await promise;
934+
935+
this.setLoading(false);
930936
return data;
931937
}
932938

@@ -2089,6 +2095,7 @@ class Browser extends DashboardView {
20892095
classwiseCloudFunctions={this.state.classwiseCloudFunctions}
20902096
callCloudFunction={this.fetchAggregationPanelData}
20912097
isLoadingCloudFunction={this.state.isLoading}
2098+
isLoading={this.state.isLoading}
20922099
setLoading={this.setLoading}
20932100
AggregationPanelData={this.state.AggregationPanelData}
20942101
setAggregationPanelData={this.setAggregationPanelData}

src/dashboard/Data/Browser/BrowserTable.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ export default class BrowserTable extends React.Component {
560560
onResize={this.props.handleResize}
561561
onAddColumn={this.props.onAddColumn}
562562
preventSchemaEdits={this.context.preventSchemaEdits}
563-
isDataLoaded={!!this.props.data}
563+
isDataLoaded={!this.props.isLoading}
564564
setSelectedObjectId={this.props.setSelectedObjectId}
565565
setCurrent={this.props.setCurrent}
566566
/>

0 commit comments

Comments
 (0)