Skip to content
Snippets Groups Projects
Commit 598b05df authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed a bunch of errors with invalid prop

Use v-model on textrea
parent 3313df58
No related branches found
No related tags found
2 merge requests!12073Add RC2 changes to 9-3-stable,!11242Refactored issue realtime elements
Pipeline #
Loading
Loading
@@ -37,7 +37,7 @@ export default {
},
data() {
const store = new Store({
title: this.initialTitle,
titleHtml: this.initialTitle,
descriptionHtml: this.initialDescriptionHtml,
descriptionText: this.initialDescriptionText,
});
Loading
Loading
@@ -86,6 +86,7 @@ export default {
:title-html="state.titleHtml"
:title-text="state.titleText" />
<description-component
v-if="state.descriptionHtml"
:can-update="canUpdate"
:description-html="state.descriptionHtml"
:description-text="state.descriptionText"
Loading
Loading
Loading
Loading
@@ -43,16 +43,7 @@
.attr('title', toolTipTime)
.tooltip('fixTitle');
 
$(this.$refs['gfm-entry-content']).renderGFM();
if (this.canUpdate) {
// eslint-disable-next-line no-new
new gl.TaskList({
dataType: 'issue',
fieldName: 'description',
selector: '.detail-page-description',
});
}
this.renderGFM();
});
},
taskStatus() {
Loading
Loading
@@ -77,17 +68,32 @@
}
},
},
methods: {
renderGFM() {
$(this.$refs['gfm-entry-content']).renderGFM();
if (this.canUpdate) {
// eslint-disable-next-line no-new
new gl.TaskList({
dataType: 'issue',
fieldName: 'description',
selector: '.detail-page-description',
});
}
},
},
mounted() {
this.renderGFM();
},
};
</script>
 
<template>
<div
v-if="descriptionHtml"
class="description"
:class="{
'js-task-list-container': canUpdate
}"
>
}">
<div
class="wiki"
:class="{
Loading
Loading
@@ -95,12 +101,12 @@
'issue-realtime-trigger-pulse': pulseAnimation
}"
v-html="descriptionHtml"
ref="gfm-content"
>
ref="gfm-content">
</div>
<textarea
class="hidden js-task-list-field"
v-if="descriptionText"
>{{ descriptionText }}</textarea>
v-model="descriptionText">
</textarea>
</div>
</template>
export default class Store {
constructor({
title,
titleHtml,
descriptionHtml,
descriptionText,
}) {
this.state = {
titleHtml: title,
titleHtml,
titleText: '',
descriptionHtml,
descriptionText,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment