diff --git a/components/collections/Add.vue b/components/collections/Add.vue index bee565ab..8e8dc353 100644 --- a/components/collections/Add.vue +++ b/components/collections/Add.vue @@ -43,16 +43,17 @@ export default { }, data() { return { - name: undefined, + name: null, } }, methods: { addNewCollection() { this.$emit("submit", this.name) + this.hideModal() }, hideModal() { + this.name = null this.$emit("hide-modal") - this.$data.name = undefined }, }, } diff --git a/components/collections/AddFolder.vue b/components/collections/AddFolder.vue index 12905a8c..0069261f 100644 --- a/components/collections/AddFolder.vue +++ b/components/collections/AddFolder.vue @@ -46,7 +46,7 @@ export default { }, data() { return { - name: undefined, + name: null, } }, methods: { @@ -56,8 +56,10 @@ export default { folder: this.folder, path: this.folderPath || `${this.collectionIndex}`, }) + this.hideModal() }, hideModal() { + this.name = null this.$emit("hide-modal") }, }, diff --git a/components/collections/Edit.vue b/components/collections/Edit.vue index c1b8cf9c..6c8dd588 100644 --- a/components/collections/Edit.vue +++ b/components/collections/Edit.vue @@ -44,16 +44,17 @@ export default { }, data() { return { - name: undefined, + name: null, } }, methods: { saveCollection() { this.$emit("submit", this.name) + this.hideModal() }, hideModal() { + this.name = null this.$emit("hide-modal") - this.$data.name = undefined }, }, } diff --git a/components/collections/EditFolder.vue b/components/collections/EditFolder.vue index ca345464..f300a928 100644 --- a/components/collections/EditFolder.vue +++ b/components/collections/EditFolder.vue @@ -42,14 +42,16 @@ export default { }, data() { return { - name: undefined, + name: null, } }, methods: { editFolder() { this.$emit("submit", this.name) + this.hideModal() }, hideModal() { + this.name = null this.$emit("hide-modal") }, }, diff --git a/components/collections/EditRequest.vue b/components/collections/EditRequest.vue index 7d92c576..d2f1bb65 100644 --- a/components/collections/EditRequest.vue +++ b/components/collections/EditRequest.vue @@ -45,15 +45,17 @@ export default { data() { return { requestUpdateData: { - name: undefined, + name: null, }, } }, methods: { saveRequest() { this.$emit("submit", this.requestUpdateData) + this.hideModal() }, hideModal() { + this.requestUpdateData = { name: null } this.$emit("hide-modal") }, }, diff --git a/components/collections/graphql/Add.vue b/components/collections/graphql/Add.vue index 1c908f32..c94e34de 100644 --- a/components/collections/graphql/Add.vue +++ b/components/collections/graphql/Add.vue @@ -45,7 +45,7 @@ export default { }, data() { return { - name: undefined, + name: null, } }, methods: { @@ -70,12 +70,12 @@ export default { name: this.$data.name, flag: "graphql", }) - this.$emit("hide-modal") this.syncCollections() + this.hideModal() }, hideModal() { + this.name = null this.$emit("hide-modal") - this.$data.name = undefined }, }, } diff --git a/components/collections/graphql/AddFolder.vue b/components/collections/graphql/AddFolder.vue index 12905a8c..d46f93a4 100644 --- a/components/collections/graphql/AddFolder.vue +++ b/components/collections/graphql/AddFolder.vue @@ -37,6 +37,8 @@