diff --git a/client/src/components/Markdown/MarkdownDialog.vue b/client/src/components/Markdown/MarkdownDialog.vue index 7dd49fd8bf75..e610692f5a80 100644 --- a/client/src/components/Markdown/MarkdownDialog.vue +++ b/client/src/components/Markdown/MarkdownDialog.vue @@ -151,27 +151,32 @@ function onOk(selectedLabel: WorkflowLabel | undefined) { const labelText: string = selectedLabel ? selectedLabel.label : ""; const labelType: string = selectedLabel ? selectedLabel.type : defaultLabelType; selectedShow.value = false; + + function onInsertArgument() { + emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`); + } + if (props.argumentType == "history_dataset_id") { if (props.useLabels) { - emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`); + onInsertArgument(); } else { dataShow.value = true; } } else if (props.argumentType == "history_dataset_collection_id") { if (props.useLabels) { - emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`); + onInsertArgument(); } else { dataCollectionShow.value = true; } } else if (props.argumentType == "job_id") { if (props.useLabels) { - emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`); + onInsertArgument(); } else { jobShow.value = true; } } else if (props.argumentType == "invocation_id") { if (props.useLabels) { - emit("onInsert", `${props.argumentName}(${labelType}="${labelText}")`); + onInsertArgument(); } else { invocationShow.value = true; } diff --git a/client/src/components/Markdown/MarkdownSelector.vue b/client/src/components/Markdown/MarkdownSelector.vue index c41f9c4109f7..d6d16cefdfe8 100644 --- a/client/src/components/Markdown/MarkdownSelector.vue +++ b/client/src/components/Markdown/MarkdownSelector.vue @@ -1,6 +1,6 @@