Skip to content

Commit cf0bd2d

Browse files
committed
rename setLoading to setLoadingInfoPanel
1 parent 1f08792 commit cf0bd2d

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/components/AggregationPanel/AggregationPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const AggregationPanel = ({
3838
}
3939
}, [errorAggregatedData, setSelectedObjectId, setErrorAggregatedData]);
4040

41-
const isLoading = useMemo(
41+
const isLoadingInfoPanel = useMemo(
4242
() => depth === 0 && selectedObjectId && isLoadingCloudFunction && showAggregatedData,
4343
[depth, selectedObjectId, isLoadingCloudFunction, showAggregatedData]
4444
);
@@ -181,7 +181,7 @@ const AggregationPanel = ({
181181

182182
return (
183183
<div className={styles.aggregationPanel}>
184-
{isLoading ? (
184+
{isLoadingInfoPanel ? (
185185
<div className={styles.center}>
186186
<LoaderDots />
187187
</div>

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Browser extends DashboardView {
111111
configData: {},
112112
classwiseCloudFunctions: {},
113113
AggregationPanelData: {},
114-
isLoading: false,
114+
isLoadingInfoPanel: false,
115115
errorAggregatedData: {},
116116
};
117117

@@ -130,7 +130,7 @@ class Browser extends DashboardView {
130130
this.showExport = this.showExport.bind(this);
131131
this.login = this.login.bind(this);
132132
this.logout = this.logout.bind(this);
133-
this.setLoading = this.setLoading.bind(this);
133+
this.setLoadingInfoPanel = this.setLoadingInfoPanel.bind(this);
134134
this.setErrorAggregatedData = this.setErrorAggregatedData.bind(this);
135135
this.toggleMasterKeyUsage = this.toggleMasterKeyUsage.bind(this);
136136
this.showAttachRowsDialog = this.showAttachRowsDialog.bind(this);
@@ -255,9 +255,9 @@ class Browser extends DashboardView {
255255
}
256256
}
257257

258-
setLoading(bool) {
258+
setLoadingInfoPanel(bool) {
259259
this.setState({
260-
isLoading: bool,
260+
isLoadingInfoPanel: bool,
261261
});
262262
}
263263

@@ -269,7 +269,7 @@ class Browser extends DashboardView {
269269

270270
fetchAggregationPanelData(objectId, className, appId) {
271271
this.setState({
272-
isLoading: true,
272+
isLoadingInfoPanel: true,
273273
});
274274
const params = {
275275
object: Parse.Object.extend(className).createWithoutData(objectId).toPointer(),
@@ -283,18 +283,18 @@ class Browser extends DashboardView {
283283
Parse.Cloud.run(cloudCodeFunction, params, options).then(
284284
result => {
285285
if (result && result.panel && result.panel && result.panel.segments) {
286-
this.setState({ AggregationPanelData: result, isLoading: false });
286+
this.setState({ AggregationPanelData: result, isLoadingInfoPanel: false });
287287
} else {
288288
this.setState({
289-
isLoading: false,
289+
isLoadingInfoPanel: false,
290290
errorAggregatedData: 'Improper JSON format',
291291
});
292292
this.showNote(this.state.errorAggregatedData, true);
293293
}
294294
},
295295
error => {
296296
this.setState({
297-
isLoading: false,
297+
isLoadingInfoPanel: false,
298298
errorAggregatedData: error.message,
299299
});
300300
this.showNote(this.state.errorAggregatedData, true);
@@ -1121,7 +1121,7 @@ class Browser extends DashboardView {
11211121
ordering: ordering,
11221122
selection: {},
11231123
errorAggregatedData: {},
1124-
isLoading: false,
1124+
isLoadingInfoPanel: false,
11251125
AggregationPanelData: {},
11261126
},
11271127
() => this.fetchData(source, this.state.filters)
@@ -2098,9 +2098,9 @@ class Browser extends DashboardView {
20982098
classes={this.classes}
20992099
classwiseCloudFunctions={this.state.classwiseCloudFunctions}
21002100
callCloudFunction={this.fetchAggregationPanelData}
2101-
isLoadingCloudFunction={this.state.isLoading}
21022101
isLoading={this.state.isLoading}
2103-
setLoading={this.setLoading}
2102+
isLoadingCloudFunction={this.state.isLoadingInfoPanel}
2103+
setLoadingInfoPanel={this.setLoadingInfoPanel}
21042104
AggregationPanelData={this.state.AggregationPanelData}
21052105
setAggregationPanelData={this.setAggregationPanelData}
21062106
setErrorAggregatedData={this.setErrorAggregatedData}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class DataBrowser extends React.Component {
192192

193193
if (!this.state.isPanelVisible) {
194194
this.props.setAggregationPanelData({});
195-
this.props.setLoading(false);
195+
this.props.setLoadingInfoPanel(false);
196196
if (this.props.errorAggregatedData != {}) {
197197
this.props.setErrorAggregatedData({});
198198
}
@@ -587,7 +587,7 @@ export default class DataBrowser extends React.Component {
587587

588588
if (newSelection.size > 1) {
589589
this.setCurrent(null);
590-
this.props.setLoading(false);
590+
this.props.setLoadingInfoPanel(false);
591591
this.setState({
592592
selectedCells: {
593593
list: newSelection,

0 commit comments

Comments
 (0)