diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-03-05 00:00:18 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-03-21 19:14:44 +0300 |
commit | 53e23a296d8cae21485698750b20244b2e075608 (patch) | |
tree | 429192916dba5fe35fbd9efd0306e3e9cf9c56de /app/assets/javascripts/notes/components/noteable_discussion.vue | |
parent | 93c27c3b22fe597a2321a19911e84fd0abd93a0b (diff) |
Pass autosaveKey from NoteableDiscussion to NoteForm
Diffstat (limited to 'app/assets/javascripts/notes/components/noteable_discussion.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/noteable_discussion.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index fd3cc859545..22103001e02 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -4,6 +4,7 @@ import { mapActions, mapGetters } from 'vuex'; import { GlTooltipDirective } from '@gitlab/ui'; import { truncateSha } from '~/lib/utils/text_utility'; import { s__, __, sprintf } from '~/locale'; +import { getDiscussionReplyKey } from '~/lib/utils/autosave'; import systemNote from '~/vue_shared/components/notes/system_note.vue'; import icon from '~/vue_shared/components/icon.vue'; import diffLineNoteFormMixin from 'ee_else_ce/notes/mixins/diff_line_note_form'; @@ -108,6 +109,9 @@ export default { author() { return this.firstNote.author; }, + autosaveKey() { + return getDiscussionReplyKey(this.firstNote.noteable_type, this.discussion.id); + }, canReply() { return this.getNoteableData.current_user.can_create_note; }, @@ -512,6 +516,7 @@ Please check your network connection and try again.`; :is-editing="false" :line="diffLine" save-button-title="Comment" + :autosave-key="autosaveKey" @handleFormUpdateAddToReview="addReplyToReview" @handleFormUpdate="saveReply" @cancelForm="cancelReplyForm" |