diff --git a/src/components/task.vue b/src/components/task.vue index 9c11136a3..3b58a4640 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -85,6 +85,7 @@ export default { VueFormRenderer }, props: { + clearTask: { type: Boolean, default: false}, initialTaskId: { type: Number, default: null }, initialScreenId: { type: Number, default: null }, initialRequestId: { type: Number, default: null }, @@ -121,6 +122,14 @@ export default { }; }, watch: { + clearTask: { + handler() { + if (this.clearTask) { + this.prepareTask(); + } + } + }, + initialScreenId: { handler() { this.screenId = this.initialScreenId; @@ -328,8 +337,12 @@ export default { this.resetScreenState(); this.requestData = _.get(this.task, 'request_data', {}); this.loopContext = _.get(this.task, "loop_context", ""); - + if (this.task.draft) { + //If Clear Task button is clicked from Inbox Rule page + if(this.clearTask) { + this.task.draft.data = {}; + } this.requestData = _.merge( {}, this.requestData,