Commit 17617a32 authored by Phil Hughes's avatar Phil Hughes

Moved value into computed property

Changed jQuery selector into document.querySelector

[ci skip]
parent 7a21e26f
......@@ -19,9 +19,14 @@
required: true,
},
},
computed: {
issuableTemplatesJson() {
return JSON.stringify(this.issuableTemplates);
},
},
mounted() {
// Create the editor for the template
const editor = $('.detail-page-description .note-textarea');
const editor = document.querySelector('.detail-page-description .note-textarea');
editor.setValue = (val) => {
this.formState.description = val;
};
......@@ -48,7 +53,7 @@
data-toggle="dropdown"
:data-namespace-path="projectNamespace"
:data-project-path="projectPath"
:data-data="JSON.stringify(issuableTemplates)">
:data-data="issuableTemplatesJson">
<span class="dropdown-toggle-text">
Choose a template
</span>
......
......@@ -2,11 +2,8 @@
import titleField from './fields/title.vue';
import descriptionField from './fields/description.vue';
import editActions from './edit_actions.vue';
<<<<<<< HEAD
import descriptionTemplate from './fields/description_template.vue';
=======
import projectMove from './fields/project_move.vue';
>>>>>>> issue-edit-inline
import confidentialCheckbox from './fields/confidential_checkbox.vue';
export default {
......@@ -59,7 +56,7 @@
},
computed: {
hasIssuableTemplates() {
return this.issuableTemplates.length !== 0;
return this.issuableTemplates.length;
},
},
};
......
......@@ -49,6 +49,7 @@ document.addEventListener('DOMContentLoaded', () => {
projectPath: initialData.project_path,
projectNamespace: initialData.namespace_path,
projectsAutocompleteUrl,
issuableTemplates: initialData.templates,
};
},
render(createElement) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment