From 938db40f9647b9501c359b5819d258043665f652 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Tue, 12 Nov 2024 17:39:47 +0100 Subject: [PATCH] fix: reduce redundancy, fix bug in items count --- packages/editor-ui/src/components/RunData.vue | 5 +++-- packages/editor-ui/src/components/RunDataTable.vue | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index 1374221b80..9935fd287e 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -318,7 +318,9 @@ const workflowRunData = computed(() => { } return null; }); -const dataCount = computed(() => getDataCount(props.runIndex, currentOutputIndex.value)); +const dataCount = computed(() => + getDataCount(props.runIndex, currentOutputIndex.value, connectionType.value), +); const unfilteredDataCount = computed(() => pinnedData.data.value ? pinnedData.data.value.length : rawInputData.value.length, @@ -1683,7 +1685,6 @@ defineExpose({ enterEditMode }); :total-runs="maxRunIndex" :has-default-hover-state="paneType === 'input' && !search" :search="search" - :sub-execution-override="activeTaskMetadata?.subExecution" @mounted="emit('tableMounted', $event)" @active-row-changed="onItemHover" @display-mode-change="onDisplayModeChange" diff --git a/packages/editor-ui/src/components/RunDataTable.vue b/packages/editor-ui/src/components/RunDataTable.vue index e5b0a85c3c..e15af8815c 100644 --- a/packages/editor-ui/src/components/RunDataTable.vue +++ b/packages/editor-ui/src/components/RunDataTable.vue @@ -6,7 +6,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store'; import { getMappedExpression } from '@/utils/mappingUtils'; import { getPairedItemId } from '@/utils/pairedItemUtils'; import { shorten } from '@/utils/typesUtils'; -import type { GenericValue, IDataObject, INodeExecutionData, RelatedExecution } from 'n8n-workflow'; +import type { GenericValue, IDataObject, INodeExecutionData } from 'n8n-workflow'; import { computed, onMounted, ref, watch } from 'vue'; import Draggable from './Draggable.vue'; import MappingPill from './MappingPill.vue'; @@ -32,7 +32,6 @@ type Props = { mappingEnabled?: boolean; hasDefaultHoverState?: boolean; search?: string; - subExecutionOverride?: RelatedExecution; }; const props = withDefaults(defineProps(), { @@ -342,10 +341,7 @@ function convertToTable(inputData: INodeExecutionData[]): ITableData { leftEntryColumns = entryColumns; } - if (props.subExecutionOverride) { - metadata.data.push({ subExecution: props.subExecutionOverride }); - metadata.hasExecutionIds = true; - } else if (data.metadata?.subExecution) { + if (data.metadata?.subExecution) { metadata.data.push(data.metadata); metadata.hasExecutionIds = true; } else {