Skip to content

Commit

Permalink
showing error message on failed clone row task (parse-community#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadakchap authored and Arul- committed May 4, 2021
1 parent 28a1160 commit d825d37
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,15 +821,20 @@ class Browser extends DashboardView {
for (const object of objects) {
toClone.push(object.clone());
}
await Parse.Object.saveAll(toClone, { useMasterKey: true });
this.setState({
selection: {},
data: [
...toClone,
...this.state.data,
],
showCloneSelectedRowsDialog: false,
});
try {
await Parse.Object.saveAll(toClone, { useMasterKey: true });
this.setState({
selection: {},
data: [...toClone, ...this.state.data],
showCloneSelectedRowsDialog: false
});
} catch (error) {
this.setState({
selection: {},
showCloneSelectedRowsDialog: false
});
this.showNote(error.message, true);
}
}

getClassRelationColumns(className) {
Expand Down

0 comments on commit d825d37

Please sign in to comment.