Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,10 @@ class Browser extends DashboardView {

async fetchParseData(source, filters) {
const { useMasterKey, skip, limit } = this.state;
this.setLoading(true);
this.setState({
data: null,
})
const query = await queryFromFilters(source, filters);
const sortDir = this.state.ordering[0] === '-' ? '-' : '+';
const field = this.state.ordering.substr(sortDir === '-' ? 1 : 0);
Expand Down Expand Up @@ -927,6 +931,8 @@ class Browser extends DashboardView {
this.setState({ isUnique, uniqueField });

const data = await promise;

this.setLoading(false);
return data;
}

Expand Down Expand Up @@ -2089,6 +2095,7 @@ class Browser extends DashboardView {
classwiseCloudFunctions={this.state.classwiseCloudFunctions}
callCloudFunction={this.fetchAggregationPanelData}
isLoadingCloudFunction={this.state.isLoading}
isLoading={this.state.isLoading}
setLoading={this.setLoading}
AggregationPanelData={this.state.AggregationPanelData}
setAggregationPanelData={this.setAggregationPanelData}
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard/Data/Browser/BrowserTable.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export default class BrowserTable extends React.Component {
onResize={this.props.handleResize}
onAddColumn={this.props.onAddColumn}
preventSchemaEdits={this.context.preventSchemaEdits}
isDataLoaded={!!this.props.data}
isDataLoaded={!this.props.isLoading}
setSelectedObjectId={this.props.setSelectedObjectId}
setCurrent={this.props.setCurrent}
/>
Expand Down
Loading