diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/vue_shared/components/source_editor.vue | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/source_editor.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/source_editor.vue | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/source_editor.vue b/app/assets/javascripts/vue_shared/components/source_editor.vue index 011cad4267c..6a0bf07c8b4 100644 --- a/app/assets/javascripts/vue_shared/components/source_editor.vue +++ b/app/assets/javascripts/vue_shared/components/source_editor.vue @@ -46,6 +46,11 @@ export default { required: false, default: () => ({}), }, + debounceValue: { + type: Number, + required: false, + default: CONTENT_UPDATE_DEBOUNCE, + }, }, data() { return { @@ -73,9 +78,7 @@ export default { ...this.editorOptions, }); - this.editor.onDidChangeModelContent( - debounce(this.onFileChange.bind(this), CONTENT_UPDATE_DEBOUNCE), - ); + this.editor.onDidChangeModelContent(debounce(this.onFileChange.bind(this), this.debounceValue)); }, beforeDestroy() { this.editor.dispose(); |