Skip to content

Commit

Permalink
Merge pull request #1949 from UmakanthKaspa/fix/reset-dialog-fields-k…
Browse files Browse the repository at this point in the history
…nowledge-base

Fix: Reset Form Fields After Creating a New Category in Knowledge Base from Agent Portal
  • Loading branch information
RitvikSardana authored Aug 30, 2024
2 parents e8e7473 + 724a8d1 commit 464c7f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions desk/src/pages/knowledge-base/KnowledgeBaseCategoryNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ const emit = defineEmits<E>();
const newCategoryName = ref("");
const newCategoryDescription = ref("");
const newCategoryIcon = ref("");
const resetForm = () => {
newCategoryName.value = "";
newCategoryDescription.value = "";
newCategoryIcon.value = "";
};
const newCategoryRes = createResource({
url: "frappe.client.insert",
makeParams() {
Expand All @@ -68,6 +75,7 @@ const newCategoryRes = createResource({
},
onSuccess(data) {
emit("success", data.name);
resetForm();
},
});
</script>

0 comments on commit 464c7f8

Please sign in to comment.