Skip to content

Commit

Permalink
Merge pull request #19703 from davelopez/fix_markdown_dialog_types
Browse files Browse the repository at this point in the history
Fix MarkdownDialog types
  • Loading branch information
mvdbeek authored Feb 26, 2025
2 parents f942729 + 0937f33 commit d8a8aff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/components/DataDialog/DataDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits<{
(e: "onCancel"): void;
(e: "onOk", results: Array<Record>): void;
(e: "onOk", results: unknown): void;
(e: "onUpload"): void;
}>();
Expand Down
14 changes: 10 additions & 4 deletions client/src/components/Markdown/MarkdownDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const props = withDefaults(defineProps<MarkdownDialogProps>(), {
argumentName: undefined,
argumentType: undefined,
argumentPayload: undefined,
labels: undefined,
});
const emit = defineEmits<{
Expand Down Expand Up @@ -120,7 +121,7 @@ async function getHistories() {
return data;
}
function onData(response: string) {
function onData(response: unknown) {
dataShow.value = false;
emit("onInsert", `${props.argumentName}(history_dataset_id=${response})`);
}
Expand Down Expand Up @@ -252,17 +253,22 @@ if (props.argumentType == "workflow_id") {
@onOk="onOk"
@onCancel="onCancel" />
<MarkdownVisualization
v-else-if="visualizationShow"
v-else-if="visualizationShow && currentHistoryId !== null"
:argument-name="argumentName"
:argument-payload="argumentPayload"
:labels="effectiveLabels"
:use-labels="useLabels"
:history="currentHistoryId"
@onOk="onVisualization"
@onCancel="onCancel" />
<DataDialog v-else-if="dataShow" :history="currentHistoryId" format="id" @onOk="onData" @onCancel="onCancel" />
<DataDialog
v-else-if="dataShow && currentHistoryId !== null"
:history="currentHistoryId"
format="id"
@onOk="onData"
@onCancel="onCancel" />
<DatasetCollectionDialog
v-else-if="dataCollectionShow"
v-else-if="dataCollectionShow && currentHistoryId !== null"
:history="currentHistoryId"
format="id"
@onOk="onDataCollection"
Expand Down

0 comments on commit d8a8aff

Please sign in to comment.