chache result in onboarding
Issue-ID: SDC-1889
Change-Id: I99dc01cc32af99399bc232125b6195b7125e6c61
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js b/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
index 34f9b88..c3e2963 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,6 +22,7 @@
import SoftwareProductCreationActionHelper from '../softwareProduct/creation/SoftwareProductCreationActionHelper.js';
import sortByStringProperty from 'nfvo-utils/sortByStringProperty.js';
import { tabsMapping } from './onboardingCatalog/OnboardingCatalogConstants.js';
+import { tabsMapping as onboardTabsMapping } from './OnboardConstants';
import { itemStatus } from 'sdc-app/common/helpers/ItemsHelperConstants.js';
import { catalogItemStatuses } from './onboardingCatalog/OnboardingCatalogConstants.js';
@@ -36,6 +37,9 @@
finalizedSoftwareProductList,
filteredItems
}) => {
+ const activeTabName = Object.keys(onboardTabsMapping).filter(item => {
+ return onboardTabsMapping[item] === activeTab;
+ })[0];
const fullSoftwareProducts = softwareProductList
.filter(
vsp =>
@@ -104,6 +108,7 @@
archivedLicenseModelList,
archivedSoftwareProductList,
fullLicenseModelList,
+ activeTabName,
activeTab,
catalogActiveTab,
searchValue,
@@ -143,8 +148,12 @@
onCatalogTabClick: tab =>
OnboardingCatalogActionHelper.changeActiveTab(dispatch, tab),
onTabClick: tab => OnboardActionHelper.changeActiveTab(dispatch, tab),
- onSearch: searchValue =>
- OnboardActionHelper.changeSearchValue(dispatch, searchValue),
+ onSearch: (searchValue, activeTab) =>
+ OnboardActionHelper.changeSearchValue(
+ dispatch,
+ searchValue,
+ activeTab
+ ),
onVendorSelect: vendor =>
OnboardingCatalogActionHelper.onVendorSelect(dispatch, { vendor }),
onMigrate: ({ softwareProduct }) =>