Commit c622252b authored by Fatih Acet's avatar Fatih Acet

Use refs instead of querySelector.

parent 13a8ad61
......@@ -44,7 +44,6 @@ export default {
},
mounted() {
if (this.isLoggedIn) {
const textarea = this.$el.querySelector('.js-note-text');
const noteableData = this.getNoteableData;
const keys = [
NOTE_TYPE,
......@@ -56,7 +55,7 @@ export default {
this.line.lineCode,
];
this.autosave = new Autosave($(textarea), keys);
this.autosave = new Autosave($(this.$refs.noteForm.$refs.textarea), keys);
}
},
methods: {
......@@ -103,6 +102,7 @@ export default {
class="content discussion-form discussion-form-container discussion-notes"
>
<note-form
ref="noteForm"
:is-editing="true"
:line-code="line.lineCode"
save-button-title="Comment"
......
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