Skip to content

Commit 4cbc78d

Browse files
authored
updating counter in sidebar on success clone rows (#1703)
1 parent 909ff92 commit 4cbc78d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ class Browser extends DashboardView {
835835
for (const objectId in this.state.selection) {
836836
objectIds.push(objectId);
837837
}
838-
const query = new Parse.Query(this.props.params.className);
838+
const className = this.props.params.className;
839+
const query = new Parse.Query(className);
839840
query.containedIn('objectId', objectIds);
840841
const objects = await query.find({ useMasterKey: true });
841842
const toClone = [];
@@ -847,7 +848,11 @@ class Browser extends DashboardView {
847848
this.setState({
848849
selection: {},
849850
data: [...toClone, ...this.state.data],
850-
showCloneSelectedRowsDialog: false
851+
showCloneSelectedRowsDialog: false,
852+
counts: {
853+
...this.state.counts,
854+
[className]: this.state.counts[className] + toClone.length
855+
}
851856
});
852857
} catch (error) {
853858
this.setState({

0 commit comments

Comments
 (0)