fix: reduce redundancy, fix bug in items count

This commit is contained in:
Mutasem Aldmour 2024-11-12 17:39:47 +01:00
parent f746da04ac
commit 938db40f96
No known key found for this signature in database
GPG key ID: 3DFA8122BB7FD6B8
2 changed files with 5 additions and 8 deletions

View file

@ -318,7 +318,9 @@ const workflowRunData = computed(() => {
} }
return null; return null;
}); });
const dataCount = computed(() => getDataCount(props.runIndex, currentOutputIndex.value)); const dataCount = computed(() =>
getDataCount(props.runIndex, currentOutputIndex.value, connectionType.value),
);
const unfilteredDataCount = computed(() => const unfilteredDataCount = computed(() =>
pinnedData.data.value ? pinnedData.data.value.length : rawInputData.value.length, pinnedData.data.value ? pinnedData.data.value.length : rawInputData.value.length,
@ -1683,7 +1685,6 @@ defineExpose({ enterEditMode });
:total-runs="maxRunIndex" :total-runs="maxRunIndex"
:has-default-hover-state="paneType === 'input' && !search" :has-default-hover-state="paneType === 'input' && !search"
:search="search" :search="search"
:sub-execution-override="activeTaskMetadata?.subExecution"
@mounted="emit('tableMounted', $event)" @mounted="emit('tableMounted', $event)"
@active-row-changed="onItemHover" @active-row-changed="onItemHover"
@display-mode-change="onDisplayModeChange" @display-mode-change="onDisplayModeChange"

View file

@ -6,7 +6,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
import { getMappedExpression } from '@/utils/mappingUtils'; import { getMappedExpression } from '@/utils/mappingUtils';
import { getPairedItemId } from '@/utils/pairedItemUtils'; import { getPairedItemId } from '@/utils/pairedItemUtils';
import { shorten } from '@/utils/typesUtils'; 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 { computed, onMounted, ref, watch } from 'vue';
import Draggable from './Draggable.vue'; import Draggable from './Draggable.vue';
import MappingPill from './MappingPill.vue'; import MappingPill from './MappingPill.vue';
@ -32,7 +32,6 @@ type Props = {
mappingEnabled?: boolean; mappingEnabled?: boolean;
hasDefaultHoverState?: boolean; hasDefaultHoverState?: boolean;
search?: string; search?: string;
subExecutionOverride?: RelatedExecution;
}; };
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
@ -342,10 +341,7 @@ function convertToTable(inputData: INodeExecutionData[]): ITableData {
leftEntryColumns = entryColumns; leftEntryColumns = entryColumns;
} }
if (props.subExecutionOverride) { if (data.metadata?.subExecution) {
metadata.data.push({ subExecution: props.subExecutionOverride });
metadata.hasExecutionIds = true;
} else if (data.metadata?.subExecution) {
metadata.data.push(data.metadata); metadata.data.push(data.metadata);
metadata.hasExecutionIds = true; metadata.hasExecutionIds = true;
} else { } else {