diff --git a/src/App.vue b/src/App.vue index 0d5c99d86..ce49aae48 100644 --- a/src/App.vue +++ b/src/App.vue @@ -400,6 +400,10 @@ export default { return warnings; }, }, + created() { + this.updateDataInput = debounce(this.updateDataInput, 1000); + this.updateDataPreview = debounce(this.updateDataPreview, 1000); + }, mounted() { this.countElements = debounce(this.countElements, 2000); if (globalObject.ProcessMaker && globalObject.ProcessMaker.user && globalObject.ProcessMaker.user.lang) { @@ -422,10 +426,9 @@ export default { }, methods: { ...mapMutations("globalErrorsModule", { setStoreMode: "setMode" }), - // eslint-disable-next-line func-names - updateDataInput: debounce(function () { + updateDataInput() { this.updateDataInputNow(); - }, 1000), + }, updateDataInputNow() { if (this.previewInputValid) { // Copy data over @@ -433,10 +436,9 @@ export default { this.updateDataPreview(); } }, - // eslint-disable-next-line func-names - updateDataPreview: debounce(function () { + updateDataPreview() { this.previewDataStringify = JSON.stringify(this.previewData, null, 2); - }, 1000), + }, monacoMounted(editor) { this.editor = editor; this.editor.updateOptions({ readOnly: true }); diff --git a/src/mixins/ScreenBase.js b/src/mixins/ScreenBase.js index 0f84d1a49..25c46d50d 100644 --- a/src/mixins/ScreenBase.js +++ b/src/mixins/ScreenBase.js @@ -145,7 +145,6 @@ export default { }, async submitForm() { await this.validateNow(findRootScreen(this)); - console.log(this.valid__, this.message__); if (!this.valid__) { window.ProcessMaker.alert(this.message__, "danger"); // if the form is not valid the data is not emitted