From 6637ee3404312201401ba1edb6efadb011977aa7 Mon Sep 17 00:00:00 2001 From: KrupaNagabhushan Date: Wed, 1 Jun 2022 18:58:16 +0100 Subject: Fix instance req and capabilities not updating Issue-ID: SDC-4030 Signed-off-by: KrupaNagabhushan Change-Id: I02c61e306087be24fb63b64b6a9c2fa27d52c0e4 --- .../panel-tabs/req-capabilities-tab/req-capabilities-tab.component.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'catalog-ui/src/app/ng2') diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/req-capabilities-tab/req-capabilities-tab.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/req-capabilities-tab/req-capabilities-tab.component.ts index 7bb88c7f59..744e56a797 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/req-capabilities-tab/req-capabilities-tab.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/req-capabilities-tab/req-capabilities-tab.component.ts @@ -144,6 +144,10 @@ export class ReqAndCapabilitiesTabComponent implements OnInit, OnDestroy { // if instance selected, we take the requirement and capabilities of the instance - always exist because we load them with the graph if (this.component instanceof FullComponentInstance) { + const selectedComponentInstance = this.compositionService.getComponentInstances() + .find(componentInstance => componentInstance.uniqueId == this.component.uniqueId); + this.component.capabilities = selectedComponentInstance.capabilities; + this.component.requirements = selectedComponentInstance.requirements; this.store.dispatch(new TogglePanelLoadingAction({isLoading: false})); this.setScopeCapabilitiesRequirements(this.component.capabilities, this.component.requirements); if (this.component.originType === 'VF') { -- cgit 1.2.3-korg