From dfd8446e5a81bb9c3942f8e6a78cd91b108843e7 Mon Sep 17 00:00:00 2001 From: Henry Jonas Date: Tue, 18 Jun 2024 11:43:17 -0400 Subject: [PATCH 1/3] FOUR-16765: The API calls in modeler is execute twice --- src/components/inspectors/InspectorPanel.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/inspectors/InspectorPanel.vue b/src/components/inspectors/InspectorPanel.vue index 178625bea..4489b74b7 100644 --- a/src/components/inspectors/InspectorPanel.vue +++ b/src/components/inspectors/InspectorPanel.vue @@ -67,6 +67,7 @@ import get from 'lodash/get'; import cloneDeep from 'lodash/cloneDeep'; import Process from './process'; import isString from 'lodash/isString'; +import { isEqual } from 'lodash'; Vue.component('FormText', renderer.FormText); Vue.component('FormInput', FormInput); @@ -91,10 +92,12 @@ export default { }; }, watch: { - highlightedNode() { - document.activeElement.blur(); - this.prepareData(); - this.prepareConfig(); + highlightedNode(nVal, oVal) { + if (!isEqual(nVal, oVal)){ + document.activeElement.blur(); + this.prepareData(); + this.prepareConfig(); + } }, 'highlightedNode.definition.assignment'(current, previous) { this.handleAssignmentChanges(current, previous); }, 'highlightedNode.definition.assignmentLock'(current, previous) { this.handleAssignmentChanges(current, previous); }, From 60fbe06c565005c417a12c929135f19e1f7e2882 Mon Sep 17 00:00:00 2001 From: henryjonathanquispe <56353454+henryjonathanquispe@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:27:27 -0400 Subject: [PATCH 2/3] Update InspectorPanel.vue --- src/components/inspectors/InspectorPanel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inspectors/InspectorPanel.vue b/src/components/inspectors/InspectorPanel.vue index 4489b74b7..8791e3e77 100644 --- a/src/components/inspectors/InspectorPanel.vue +++ b/src/components/inspectors/InspectorPanel.vue @@ -93,7 +93,7 @@ export default { }, watch: { highlightedNode(nVal, oVal) { - if (!isEqual(nVal, oVal)){ + if (!isEqual(newVal, oldVal)) { document.activeElement.blur(); this.prepareData(); this.prepareConfig(); From d087dd34666b24b7ab9703848c950e4c31b74701 Mon Sep 17 00:00:00 2001 From: henryjonathanquispe <56353454+henryjonathanquispe@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:28:06 -0400 Subject: [PATCH 3/3] Update InspectorPanel.vue --- src/components/inspectors/InspectorPanel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inspectors/InspectorPanel.vue b/src/components/inspectors/InspectorPanel.vue index 8791e3e77..dc8c5135b 100644 --- a/src/components/inspectors/InspectorPanel.vue +++ b/src/components/inspectors/InspectorPanel.vue @@ -92,7 +92,7 @@ export default { }; }, watch: { - highlightedNode(nVal, oVal) { + highlightedNode(newVal, oldVal) { if (!isEqual(newVal, oldVal)) { document.activeElement.blur(); this.prepareData();