diff options
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js b/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js index 34f9b88a7b..c3e2963412 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 LicenseModelCreationActionHelper from '../licenseModel/creation/LicenseMo 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 @@ export const mapStateToProps = ({ finalizedSoftwareProductList, filteredItems }) => { + const activeTabName = Object.keys(onboardTabsMapping).filter(item => { + return onboardTabsMapping[item] === activeTab; + })[0]; const fullSoftwareProducts = softwareProductList .filter( vsp => @@ -104,6 +108,7 @@ export const mapStateToProps = ({ archivedLicenseModelList, archivedSoftwareProductList, fullLicenseModelList, + activeTabName, activeTab, catalogActiveTab, searchValue, @@ -143,8 +148,12 @@ const mapActionsToProps = dispatch => { 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 }) => |