Reset save req selection when selected item is deleted
This commit is contained in:
@@ -197,6 +197,10 @@ export default Vue.extend({
|
||||
this.showChildren = !this.showChildren
|
||||
},
|
||||
removeCollection() {
|
||||
// Cancel pick if picked collection is deleted
|
||||
if (this.picked && this.picked.pickedType === "gql-my-collection" && this.picked.collectionIndex === this.collectionIndex) {
|
||||
this.$emit("select", { picked: null })
|
||||
}
|
||||
removeGraphqlCollection(this.collectionIndex)
|
||||
|
||||
this.$toast.error(this.$t("deleted").toString(), {
|
||||
|
||||
@@ -181,6 +181,11 @@ export default Vue.extend({
|
||||
this.showChildren = !this.showChildren
|
||||
},
|
||||
removeFolder() {
|
||||
// Cancel pick if the picked folder is deleted
|
||||
if (this.picked && this.picked.pickedType === "gql-my-folder" && this.picked.folderPath === this.folderPath) {
|
||||
this.$emit("select", { picked: null })
|
||||
}
|
||||
|
||||
removeGraphqlFolder(this.folderPath)
|
||||
this.$toast.error(this.$t("deleted").toString(), {
|
||||
icon: "delete",
|
||||
|
||||
@@ -122,6 +122,11 @@ export default Vue.extend({
|
||||
dataTransfer.setData("requestIndex", this.requestIndex)
|
||||
},
|
||||
removeRequest() {
|
||||
// Cancel pick if the picked request is deleted
|
||||
if (this.picked && this.picked.pickedType === "gql-my-request" && this.picked.folderPath === this.folderPath && this.picked.requestIndex === this.requestIndex) {
|
||||
this.$emit("select", { picked: null })
|
||||
}
|
||||
|
||||
removeGraphqlRequest(this.folderPath, this.requestIndex)
|
||||
this.$toast.error(this.$t("deleted").toString(), {
|
||||
icon: "delete",
|
||||
|
||||
Reference in New Issue
Block a user