fix(editor): Fix NDV unexpected re-render (#7532)

This commit is contained in:
Csaba Tuncsik 2023-10-30 09:22:08 +01:00 committed by GitHub
parent 233683ce1a
commit 2853fcff73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -28,7 +28,7 @@
teleported
size="small"
:modelValue="currentNodeName"
@update:modelValue="onSelect"
@update:modelValue="onInputNodeChange"
:no-data-text="$locale.baseText('ndv.input.noNodesFound')"
:placeholder="$locale.baseText('ndv.input.parentNodes')"
filterable
@ -432,9 +432,9 @@ export default defineComponent({
onUnlinkRun() {
this.$emit('unlinkRun');
},
onSelect(value: string) {
onInputNodeChange(value: string) {
const index = this.parentNodes.findIndex((node) => node.name === value) + 1;
this.$emit('select', value, index);
this.$emit('changeInputNode', value, index);
},
onConnectionHelpClick() {
if (this.activeNode) {

View file

@ -69,7 +69,7 @@
@unlinkRun="() => onUnlinkRun('input')"
@runChange="onRunInputIndexChange"
@openSettings="openSettings"
@select="onInputSelect"
@changeInputNode="onInputNodeChange"
@execute="onNodeExecute"
@tableMounted="onInputTableMounted"
@itemHover="onInputItemHover"
@ -710,7 +710,7 @@ export default defineComponent({
pane,
});
},
onInputSelect(value: string, index: number) {
onInputNodeChange(value: string, index: number) {
this.runInputIndex = -1;
this.isLinkingEnabled = true;
this.selectedInput = value;