Commit 97094154 authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by Martin Wortschack

Resolve "Design discussion note preview is broken"

parent 43a868d8
......@@ -79,6 +79,12 @@ export default {
required: false,
default: false,
},
// This prop is used as a fallback in case if textarea.elm is undefined
textareaValue: {
type: String,
required: false,
default: '',
},
},
data() {
return {
......@@ -183,7 +189,7 @@ export default {
Can't use `$refs` as the component is technically in the parent component
so we access the VNode & then get the element
*/
const text = this.$slots.textarea[0].elm.value;
const text = this.$slots.textarea[0]?.elm?.value || this.textareaValue;
if (text) {
this.markdownPreviewLoading = true;
......
---
title: Resolve Design discussion note preview is broken
merge_request: 24288
author:
type: fixed
......@@ -53,6 +53,7 @@ export default {
:markdown-preview-path="markdownPreviewPath"
:can-attach-file="false"
:enable-autocomplete="false"
:textarea-value="value"
markdown-docs-path="/help/user/markdown"
class="bordered-box"
>
......
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