fix(editor): Data in input/output panel incorrectly mapped (#14878)

This commit is contained in:
Suguru Inoue
2025-04-28 14:30:44 +02:00
committed by GitHub
parent 2212aeba30
commit 0a2b740063
16 changed files with 358 additions and 68 deletions

View File

@@ -22,7 +22,7 @@ import {
} from '@/constants';
import { useWorkflowActivate } from '@/composables/useWorkflowActivate';
import type { DataPinningDiscoveryEvent } from '@/event-bus';
import { dataPinningEventBus } from '@/event-bus';
import { dataPinningEventBus, ndvEventBus } from '@/event-bus';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useNDVStore } from '@/stores/ndv.store';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
@@ -80,8 +80,8 @@ const settingsEventBus = createEventBus();
const redrawRequired = ref(false);
const runInputIndex = ref(-1);
const runOutputIndex = computed(() => ndvStore.output.run ?? -1);
const isLinkingEnabled = ref(true);
const selectedInput = ref<string | undefined>();
const isLinkingEnabled = ref(true);
const triggerWaitingWarningEnabled = ref(false);
const isDragging = ref(false);
const mainPanelPosition = ref(0);
@@ -615,6 +615,10 @@ const unregisterKeyboardListener = () => {
document.removeEventListener('keydown', onKeyDown, true);
};
const setSelectedInput = (value: string | undefined) => {
selectedInput.value = value;
};
//watchers
watch(
@@ -702,10 +706,12 @@ watch(inputRun, (inputRun) => {
onMounted(() => {
dataPinningEventBus.on('data-pinning-discovery', setIsTooltipVisible);
ndvEventBus.on('updateInputNodeName', setSelectedInput);
});
onBeforeUnmount(() => {
dataPinningEventBus.off('data-pinning-discovery', setIsTooltipVisible);
ndvEventBus.off('updateInputNodeName', setSelectedInput);
unregisterKeyboardListener();
});
</script>