diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
index b9ffdc3..c3cf8b2 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.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.
@@ -31,7 +31,6 @@
 import SoftwareProductComponentsNetworkActionHelper from './softwareProduct/components/network/SoftwareProductComponentsNetworkActionHelper.js';
 import SoftwareProductDependenciesActionHelper from './softwareProduct/dependencies/SoftwareProductDependenciesActionHelper.js';
 import ComputeFlavorActionHelper from './softwareProduct/components/compute/ComputeFlavorActionHelper.js';
-import OnboardActionHelper from './onboard/OnboardActionHelper.js';
 import MergeEditorActionHelper from 'sdc-app/common/merge/MergeEditorActionHelper.js';
 import SoftwareProductComponentsMonitoringAction from './softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringActionHelper.js';
 import { actionTypes, enums } from './OnboardingConstants.js';
@@ -82,7 +81,6 @@
         await FeaturesActionHelper.getFeaturesList(dispatch);
         UsersActionHelper.fetchUsersList(dispatch);
         this.loadItemsLists(dispatch);
-        OnboardActionHelper.resetOnboardStore(dispatch);
         setCurrentScreen(dispatch, enums.SCREEN.ONBOARDING_CATALOG);
         dispatch({
             type: filterActionTypes.FILTER_DATA_CHANGED,
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
index b535595..c2fb2e7 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
@@ -27,10 +27,12 @@
     filter,
     onSelect,
     onMigrate,
-    users
+    users,
+    activeTabName
 }) {
+    const filteredValue = filter[activeTabName];
     const filteredItems = items.length
-        ? filterCatalogItemsByType({ items, filter })
+        ? filterCatalogItemsByType({ items, filter: filteredValue })
         : [];
     return filteredItems.map(item => (
         <CatalogItemDetails
@@ -51,7 +53,8 @@
         onSelectVSP: PropTypes.func.isRequired,
         onAddVLM: PropTypes.func,
         onAddVSP: PropTypes.func,
-        filter: PropTypes.string.isRequired
+        filter: PropTypes.object.isRequired,
+        activeTabName: PropTypes.string
     };
 
     shouldComponentUpdate(nextProps) {
@@ -71,8 +74,9 @@
             onAddVLM,
             onSelectVLM,
             onSelectVSP,
-            filter = '',
-            onMigrate
+            filter,
+            onMigrate,
+            activeTabName
         } = this.props;
         return (
             <CatalogList onAddVLM={onAddVLM} onAddVSP={onAddVSP}>
@@ -82,7 +86,8 @@
                     filter,
                     onSelect: onSelectVLM,
                     onMigrate,
-                    users
+                    users,
+                    activeTabName
                 })}
                 {renderCatalogItems({
                     items: VSPList,
@@ -90,7 +95,8 @@
                     filter,
                     onSelect: onSelectVSP,
                     onMigrate,
-                    users
+                    users,
+                    activeTabName
                 })}
             </CatalogList>
         );
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 }) =>
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardActionHelper.js
index 8443fe9..9f2b3dd 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardActionHelper.js
@@ -4,16 +4,20 @@
  * 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.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { tabsMapping, actionTypes } from './OnboardConstants.js';
+import {
+    tabsMapping,
+    actionTypes,
+    searchValueObj
+} from './OnboardConstants.js';
 import ScreensHelper from 'sdc-app/common/helpers/ScreensHelper.js';
 import { enums, screenTypes } from 'sdc-app/onboarding/OnboardingConstants.js';
 import VersionsPageActionHelper from 'sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js';
@@ -30,7 +34,6 @@
         });
     },
     changeActiveTab(dispatch, activeTab) {
-        this.clearSearchValue(dispatch);
         dispatch({
             type: actionTypes.CHANGE_ACTIVE_ONBOARD_TAB,
             activeTab
@@ -47,16 +50,18 @@
                       }
         });
     },
-    changeSearchValue(dispatch, searchValue) {
+    changeSearchValue(dispatch, searchValue, activeTab) {
         dispatch({
             type: actionTypes.CHANGE_SEARCH_VALUE,
-            searchValue
+            payload: { searchValue, activeTab }
         });
     },
     clearSearchValue(dispatch) {
         dispatch({
-            type: actionTypes.CHANGE_SEARCH_VALUE,
-            searchValue: ''
+            type: actionTypes.CLEAR_SEARCH_VALUE,
+            payload: {
+                searchValue: searchValueObj
+            }
         });
     },
 
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardConstants.js b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardConstants.js
index 6fbf265..fc34f74 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardConstants.js
@@ -20,9 +20,15 @@
     CATALOG: 2
 };
 
+export const searchValueObj = {
+    WORKSPACE: '',
+    CATALOG: ''
+};
+
 export const actionTypes = keyMirror({
     CHANGE_ACTIVE_ONBOARD_TAB: null,
     CHANGE_SEARCH_VALUE: null,
+    CLEAR_SEARCH_VALUE: null,
     RESET_ONBOARD_STORE: null,
     VSP_MIGRATION: null
 });
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardReducer.js b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardReducer.js
index 39ceb31..28cd7e2 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardReducer.js
@@ -17,6 +17,7 @@
 import { combineReducers } from 'redux';
 import onboardingCatalogReducer from './onboardingCatalog/OnboardingCatalogReducer.js';
 import filterReducer from './filter/FilterReducer.js';
+import searchReducer from './SearchReducer.js';
 
 const onboardReducer = combineReducers({
     onboardingCatalog: onboardingCatalogReducer,
@@ -25,10 +26,7 @@
         action.type === actionTypes.CHANGE_ACTIVE_ONBOARD_TAB
             ? action.activeTab
             : state,
-    searchValue: (state = '', action) =>
-        action.type === actionTypes.CHANGE_SEARCH_VALUE
-            ? action.searchValue
-            : state
+    searchValue: searchReducer
 });
 
 export default (state, action) => {
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
index c5cf292..b21ea3e 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
@@ -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.
@@ -78,7 +78,7 @@
         onSearch: PropTypes.func.isRequired,
         activeTab: PropTypes.number.isRequired,
         catalogActiveTab: PropTypes.number.isRequired,
-        searchValue: PropTypes.string.isRequired,
+        searchValue: PropTypes.object.isRequired,
         onMigrate: PropTypes.func.isRequired
     };
     renderViewByTab(activeTab) {
@@ -93,7 +93,13 @@
     }
 
     render() {
-        let { activeTab, onTabClick, onSearch, searchValue } = this.props;
+        let {
+            activeTab,
+            activeTabName,
+            onTabClick,
+            onSearch,
+            searchValue
+        } = this.props;
         return (
             <div className="catalog-view">
                 <Filter />
@@ -101,8 +107,8 @@
                     <OnboardHeader
                         activeTab={activeTab}
                         onTabClick={onTabClick}
-                        searchValue={searchValue}
-                        onSearch={value => onSearch(value)}
+                        searchValue={searchValue[activeTabName]}
+                        onSearch={value => onSearch(value, activeTabName)}
                     />
                     {this.renderViewByTab(activeTab)}
                 </div>
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/SearchReducer.js b/openecomp-ui/src/sdc-app/onboarding/onboard/SearchReducer.js
new file mode 100644
index 0000000..8440091
--- /dev/null
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/SearchReducer.js
@@ -0,0 +1,34 @@
+/*
+* Copyright © 2018 European Support Limited
+*
+* 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.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+import { actionTypes, searchValueObj } from '../onboard/OnboardConstants.js';
+
+export default (state = searchValueObj, action) => {
+    switch (action.type) {
+        case actionTypes.CHANGE_SEARCH_VALUE:
+            return {
+                ...state,
+                ...{
+                    [action.payload.activeTab]: action.payload.searchValue
+                }
+            };
+        case actionTypes.CLEAR_SEARCH_VALUE:
+            return {
+                ...action.payload.searchValue
+            };
+        default:
+            return state;
+    }
+};
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js
index aebb829..e4c7b5c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js
@@ -17,7 +17,6 @@
 import i18n from 'nfvo-utils/i18n/i18n.js';
 import { actionTypes } from './OnboardingCatalogConstants.js';
 import { actionTypes as modalActionTypes } from 'nfvo-components/modal/GlobalModalConstants.js';
-import OnboardActionHelper from '../OnboardActionHelper.js';
 import SoftwareProductActionHelper from 'sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js';
 
 function getMessageForMigration(name) {
@@ -47,14 +46,12 @@
         });
     },
     changeActiveTab(dispatch, activeTab) {
-        OnboardActionHelper.clearSearchValue(dispatch);
         dispatch({
             type: actionTypes.CHANGE_ACTIVE_CATALOG_TAB,
             activeTab
         });
     },
     onVendorSelect(dispatch, { vendor }) {
-        OnboardActionHelper.clearSearchValue(dispatch);
         dispatch({
             type: actionTypes.ONBOARDING_CATALOG_OPEN_VENDOR_PAGE,
             selectedVendor: vendor
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js
index d1e401f..1e87480 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js
@@ -1,21 +1,22 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- *
- * 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. See the License for the specific language governing
- * permissions and limitations under the License.
- */
+/*
+* Copyright © 2018 European Support Limited
+*
+* 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.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 
 export const filterCatalogItemsByType = ({ items, filter }) => {
     return items.filter(
-        item => item.name.toLowerCase().indexOf(filter.toLowerCase()) > -1
+        item =>
+            item.name.toLowerCase().indexOf(filter && filter.toLowerCase()) > -1
     );
 };
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
index ec3d455..bd7fff0 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
@@ -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.
@@ -45,7 +45,8 @@
             searchValue,
             onMigrate,
             filteredItems,
-            isArchived
+            isArchived,
+            activeTabName
         } = this.props;
 
         const { vlmList, vspList } = filteredItems;
@@ -74,6 +75,7 @@
                                 WCTabsMapping.CATALOG
                             )
                         }
+                        activeTabName={activeTabName}
                         filter={searchValue}
                         onMigrate={onMigrate}
                     />
@@ -107,6 +109,7 @@
                         selectedVendor={selectedVendor}
                         onVspOverlayChange={onVspOverlayChange}
                         onMigrate={onMigrate}
+                        activeTabName={activeTabName}
                         filter={searchValue}
                     />
                 );
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx
index ec45258..69ddb98 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx
@@ -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.
@@ -31,7 +31,8 @@
     filter,
     onMigrate,
     users,
-    isArchived
+    isArchived,
+    activeTabName
 }) => {
     const showAddButtons = !isArchived;
     const handeleSelectVSP = vsp => onSelectVSP(vsp, users);
@@ -42,21 +43,22 @@
         <CatalogList
             onAddVLM={showAddButtons ? onAddVLM : false}
             onAddVSP={showAddButtons ? onAddVSP : false}>
-            {filterCatalogItemsByType({ items: licenseModelList, filter }).map(
-                vlm => (
-                    <VendorItem
-                        key={vlm.id}
-                        vlm={vlm}
-                        onAddVSP={onAddVSP}
-                        onSelectVSP={handeleSelectVSP}
-                        shouldShowOverlay={currentOverlay === vlm.id}
-                        onVSPButtonClick={handleOnVspButtonClick}
-                        onVendorSelect={onVendorSelect}
-                        onMigrate={onMigrate}
-                        vendor={vlm}
-                    />
-                )
-            )}
+            {filterCatalogItemsByType({
+                items: licenseModelList,
+                filter: filter[activeTabName]
+            }).map(vlm => (
+                <VendorItem
+                    key={vlm.id}
+                    vlm={vlm}
+                    onAddVSP={onAddVSP}
+                    onSelectVSP={handeleSelectVSP}
+                    shouldShowOverlay={currentOverlay === vlm.id}
+                    onVSPButtonClick={handleOnVspButtonClick}
+                    onVendorSelect={onVendorSelect}
+                    onMigrate={onMigrate}
+                    vendor={vlm}
+                />
+            ))}
         </CatalogList>
     );
 };
@@ -70,7 +72,8 @@
     filter,
     onMigrate,
     users,
-    isArchived
+    isArchived,
+    activeTabName
 }) => {
     const handleAddVsp = !isArchived
         ? () => onAddVSP(selectedVendor.id)
@@ -93,7 +96,7 @@
                 />
                 {filterCatalogItemsByType({
                     items: selectedVendor.softwareProductList,
-                    filter
+                    filter: filter[activeTabName]
                 }).map(vsp => (
                     <CatalogItemDetails
                         key={vsp.id}
@@ -109,6 +112,10 @@
 };
 
 class VendorCatalogView extends React.Component {
+    componentDidMount() {
+        const { onVendorSelect } = this.props;
+        onVendorSelect(false);
+    }
     render() {
         let { selectedVendor } = this.props;
         return selectedVendor ? (
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
index d3e0eb4..73545d7 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
@@ -39,11 +39,12 @@
         onSelectVSP: PropTypes.func,
         onVendorSelect: PropTypes.func,
         onAddVSP: PropTypes.func,
-        onVSPButtonClick: PropTypes.func
+        onVSPButtonClick: PropTypes.func,
+        activeTabName: PropTypes.string
     };
     handleSeeMore = () => {
-        const { onVendorSelect, vendor } = this.props;
-        onVendorSelect(vendor);
+        const { onVendorSelect, vendor, activeTabName } = this.props;
+        onVendorSelect(vendor, activeTabName);
     };
     render() {
         let { vendor, onSelectVSP, shouldShowOverlay, onMigrate } = this.props;
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
index 8cc396f..0297189 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
@@ -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.
@@ -28,7 +28,8 @@
         searchValue,
         onMigrate,
         filteredItems: { vspList, vlmList },
-        isArchived
+        isArchived,
+        activeTabName
     } = props;
     const handleSelectVSP = (item, users) =>
         onSelectSoftwareProduct(item, users, tabsMapping.WORKSPACE);
@@ -49,6 +50,7 @@
                 onSelectVSP={handleSelectVSP}
                 onMigrate={onMigrate}
                 filter={searchValue}
+                activeTabName={activeTabName}
             />
         </div>
     );
diff --git a/openecomp-ui/test/onboard/onboardingCatalog/test.js b/openecomp-ui/test/onboard/onboardingCatalog/test.js
index 4e38675..9cbae40 100644
--- a/openecomp-ui/test/onboard/onboardingCatalog/test.js
+++ b/openecomp-ui/test/onboard/onboardingCatalog/test.js
@@ -4,60 +4,65 @@
  * 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.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import {storeCreator} from 'sdc-app/AppStore.js';
-import {OnboardingCatalogStoreFactory} from 'test-utils/factories/onboard/OnboardingCatalogFactories.js';
-import {LicenseModelStoreFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
+import { storeCreator } from 'sdc-app/AppStore.js';
+import { OnboardingCatalogStoreFactory } from 'test-utils/factories/onboard/OnboardingCatalogFactories.js';
+import { LicenseModelStoreFactory } from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
 import OnboardingCatalogActionHelper from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js';
-import {tabsMapping} from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js';
-
 
 describe('Onboarding Catalog Module Tests', () => {
-	it('should return default state', () => {
-		const store = storeCreator();
-		const expectedStore = OnboardingCatalogStoreFactory.build();
-		expect(store.getState().onboard.onboardingCatalog).toEqual(expectedStore);
-	});
+    it('should return default state', () => {
+        const store = storeCreator();
+        const expectedStore = OnboardingCatalogStoreFactory.build();
+        expect(store.getState().onboard.onboardingCatalog).toEqual(
+            expectedStore
+        );
+    });
 
-	it('should change active tab to All', () => {
-		const store = storeCreator();
-		const expectedStore = OnboardingCatalogStoreFactory.build({activeTab: tabsMapping.ACTIVE});
-		OnboardingCatalogActionHelper.changeActiveTab(store.dispatch, tabsMapping.ACTIVE);
-		expect(store.getState().onboard.onboardingCatalog).toEqual(expectedStore);
-	});
+    it('should change VSP Overlay', () => {
+        const vendor = LicenseModelStoreFactory.build();
+        const store = storeCreator();
+        const expectedStore = OnboardingCatalogStoreFactory.build({
+            vendorCatalog: { vspOverlay: vendor.id }
+        });
+        OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, vendor);
+        expect(store.getState().onboard.onboardingCatalog).toEqual(
+            expectedStore
+        );
+    });
 
+    it('should close VSP Overlay', () => {
+        const vendor = LicenseModelStoreFactory.build();
+        const store = storeCreator();
+        const expectedStore = OnboardingCatalogStoreFactory.build({
+            vendorCatalog: { vspOverlay: null }
+        });
+        OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, vendor);
+        OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, null);
+        expect(store.getState().onboard.onboardingCatalog).toEqual(
+            expectedStore
+        );
+    });
 
-	it('should change VSP Overlay', () => {
-		const vendor = LicenseModelStoreFactory.build();
-		const store = storeCreator();
-		const expectedStore = OnboardingCatalogStoreFactory.build({vendorCatalog: {vspOverlay: vendor.id}});
-		OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, vendor);
-		expect(store.getState().onboard.onboardingCatalog).toEqual(expectedStore);
-	});
-
-	it('should close VSP Overlay', () => {
-		const vendor = LicenseModelStoreFactory.build();
-		const store = storeCreator();
-		const expectedStore = OnboardingCatalogStoreFactory.build({vendorCatalog: {vspOverlay: null}});
-		OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, vendor);
-		OnboardingCatalogActionHelper.changeVspOverlay(store.dispatch, null);
-		expect(store.getState().onboard.onboardingCatalog).toEqual(expectedStore);
-	});
-
-	it('should select vendor', () => {
-		const vendor = LicenseModelStoreFactory.build();
-		const store = storeCreator();
-		const expectedStore = OnboardingCatalogStoreFactory.build({vendorCatalog: {selectedVendor: vendor}});
-		OnboardingCatalogActionHelper.onVendorSelect(store.dispatch, {vendor});
-		expect(store.getState().onboard.onboardingCatalog).toEqual(expectedStore);
-	});
-
+    it('should select vendor', () => {
+        const vendor = LicenseModelStoreFactory.build();
+        const store = storeCreator();
+        const expectedStore = OnboardingCatalogStoreFactory.build({
+            vendorCatalog: { selectedVendor: vendor }
+        });
+        OnboardingCatalogActionHelper.onVendorSelect(store.dispatch, {
+            vendor
+        });
+        expect(store.getState().onboard.onboardingCatalog).toEqual(
+            expectedStore
+        );
+    });
 });
diff --git a/openecomp-ui/test/onboard/onboardingCatalog/views.test.js b/openecomp-ui/test/onboard/onboardingCatalog/views.test.js
index 63b49aa..8b193be 100644
--- a/openecomp-ui/test/onboard/onboardingCatalog/views.test.js
+++ b/openecomp-ui/test/onboard/onboardingCatalog/views.test.js
@@ -15,138 +15,168 @@
  */
 
 import React from 'react';
-import {Provider} from 'react-redux';
-import {storeCreator} from 'sdc-app/AppStore.js';
+import { Provider } from 'react-redux';
+import { storeCreator } from 'sdc-app/AppStore.js';
 
 import TestUtils from 'react-dom/test-utils';
-import {defaultStoreFactory} from 'test-utils/factories/onboard/OnboardingCatalogFactories.js';
-import {FinalizedLicenseModelFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
-import {VSPEditorFactory} from 'test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js';
-import {mapStateToProps} from 'sdc-app/onboarding/onboard/Onboard.js';
-import {catalogItemTypes} from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js';
+import { defaultStoreFactory } from 'test-utils/factories/onboard/OnboardingCatalogFactories.js';
+import { FinalizedLicenseModelFactory } from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
+import { VSPEditorFactory } from 'test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js';
+import { mapStateToProps } from 'sdc-app/onboarding/onboard/Onboard.js';
+import { catalogItemTypes } from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js';
 import OnboardingCatalogView from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx';
 import VendorItem from 'sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx';
 import VSPOverlay from 'sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx';
 import CatalogItemDetails from 'sdc-app/onboarding/onboard/CatalogItemDetails.jsx';
 import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.jsx';
+import {
+    searchValueObj,
+    tabsMapping
+} from 'sdc-app/onboarding/onboard/OnboardConstants';
 
-describe('OnBoarding Catalog test - View: ', function () {
+describe('OnBoarding Catalog test - View: ', function() {
+    it('mapStateToProps mapper exists', () => {
+        expect(mapStateToProps).toBeTruthy();
+    });
 
+    it('mapStateToProps data test', () => {
+        const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
+        const softwareProductList = VSPEditorFactory.buildList(4);
+        const data = defaultStoreFactory.build({
+            licenseModelList,
+            softwareProductList
+        });
 
-	it('mapStateToProps mapper exists', () => {
-		expect(mapStateToProps).toBeTruthy();
-	});
+        var results = mapStateToProps(data);
+        expect(results.softwareProductList).toBeTruthy();
+        expect(results.licenseModelList).toBeTruthy();
+        expect(results.activeTab).toBeTruthy();
+        expect(results.licenseModelList.length).toEqual(3);
+    });
 
-	it('mapStateToProps data test', () => {
+    it('licenseModelList creating algorithm test', () => {
+        const finalizedLicenseModelList = FinalizedLicenseModelFactory.buildList(
+            3
+        );
+        const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
+        const finalizedSoftwareProductList = VSPEditorFactory.buildList(4, {
+            vendorId: finalizedLicenseModelList[0].id
+        });
+        const softwareProductList = VSPEditorFactory.buildList(4, {
+            vendorId: finalizedLicenseModelList[1].id
+        });
+        const data = defaultStoreFactory.build({
+            licenseModelList,
+            finalizedLicenseModelList,
+            softwareProductList,
+            finalizedSoftwareProductList
+        });
 
-		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
-		const softwareProductList = VSPEditorFactory.buildList(4);
-		const data = defaultStoreFactory.build({licenseModelList, softwareProductList});
+        var results = mapStateToProps(data);
+        expect(
+            results.finalizedLicenseModelList[0].softwareProductList.length
+        ).toEqual(finalizedSoftwareProductList.length);
+    });
 
-		var results = mapStateToProps(data);
-		expect(results.softwareProductList).toBeTruthy();
-		expect(results.licenseModelList).toBeTruthy();
-		expect(results.activeTab).toBeTruthy();
-		expect(results.licenseModelList.length).toEqual(3);
-	});
+    it('Catalog view test', () => {
+        const dummyFunc = () => {};
+        const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
+        const softwareProductList = VSPEditorFactory.buildList(4, {
+            vendorId: licenseModelList[0].id
+        });
+        const data = defaultStoreFactory.build({
+            licenseModelList,
+            softwareProductList
+        });
 
-	it('licenseModelList creating algorithm test', () => {
+        const func = {
+            onAddLicenseModelClick: dummyFunc,
+            onAddSoftwareProductClick: dummyFunc,
+            closeVspOverlay: dummyFunc,
+            onVspOverlayChange: dummyFunc,
+            onTabClick: dummyFunc,
+            onSearch: dummyFunc,
+            onSelectLicenseModel: dummyFunc,
+            onSelectSoftwareProduct: dummyFunc,
+            resetOnboardingCatalogStore: ''
+        };
 
-		const finalizedLicenseModelList = FinalizedLicenseModelFactory.buildList(3);
-		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
-		const finalizedSoftwareProductList = VSPEditorFactory.buildList(4, {vendorId: finalizedLicenseModelList[0].id});
-		const softwareProductList = VSPEditorFactory.buildList(4, {vendorId: finalizedLicenseModelList[1].id});
-		const data = defaultStoreFactory.build({licenseModelList, finalizedLicenseModelList, softwareProductList, finalizedSoftwareProductList});
+        let params = { ...func, ...mapStateToProps(data) };
+        const store = storeCreator();
 
-		var results = mapStateToProps(data);
-		expect(results.finalizedLicenseModelList[0].softwareProductList.length).toEqual(finalizedSoftwareProductList.length);
-	});
+        let CatalogView = TestUtils.renderIntoDocument(
+            <Provider store={store}>
+                <OnboardingCatalogView {...params} />
+            </Provider>
+        );
+        expect(CatalogView).toBeTruthy();
+    });
 
+    it('VendorItem view test', () => {
+        let vendor = FinalizedLicenseModelFactory.build();
+        const dummyFunc = () => {};
+        let params = {
+            softwareProductList: VSPEditorFactory.buildList(4, {
+                vendorId: vendor.id
+            }),
+            vendor,
+            onSelectVSP: dummyFunc,
+            shouldShowOverlay: false,
+            onVendorSelect: dummyFunc,
+            onAddVSP: dummyFunc,
+            onVSPIconClick: dummyFunc
+        };
 
-	it('Catalog view test', () => {
+        let VendorItemView = TestUtils.renderIntoDocument(
+            <VendorItem {...params} />
+        );
+        expect(VendorItemView).toBeTruthy();
+    });
 
-		const dummyFunc = () => {};
-		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
-		const softwareProductList = VSPEditorFactory.buildList(4, {vendorId: licenseModelList[0].id});
-		const data = defaultStoreFactory.build({licenseModelList, softwareProductList});
+    it('VSPOverlay view test', () => {
+        let params = {
+            VSPList: VSPEditorFactory.buildList(10, { vendorId: '1' }),
+            onSelectVSP: () => {}
+        };
 
-		const func = {
-			onAddLicenseModelClick: dummyFunc,
-			onAddSoftwareProductClick: dummyFunc,
-			closeVspOverlay: dummyFunc,
-			onVspOverlayChange: dummyFunc,
-			onTabClick: dummyFunc,
-			onSearch: dummyFunc,
-			onSelectLicenseModel: dummyFunc,
-			onSelectSoftwareProduct: dummyFunc,
-			resetOnboardingCatalogStore: ''
-		};
+        let VSPOverlayView = TestUtils.renderIntoDocument(
+            <div>
+                <VSPOverlay {...params} />
+            </div>
+        );
+        expect(VSPOverlayView).toBeTruthy();
+    });
 
-		let params = {...func, ...mapStateToProps(data)};
-		const store = storeCreator();
+    it('CatalogItemDetails view test', () => {
+        let params = {
+            catalogItemData: FinalizedLicenseModelFactory.build(),
+            onSelect: () => {},
+            catalogItemTypeClass: catalogItemTypes.LICENSE_MODEL
+        };
 
-		let CatalogView = TestUtils.renderIntoDocument(
-			<Provider store={store}>
-				<OnboardingCatalogView
-					{...params}/>
-			</Provider>);
-		expect(CatalogView).toBeTruthy();
-	});
+        let CatalogItemDetailsView = TestUtils.renderIntoDocument(
+            <div>
+                <CatalogItemDetails {...params} />
+            </div>
+        );
+        expect(CatalogItemDetailsView).toBeTruthy();
+    });
 
-	it('VendorItem view test', () => {
-		let vendor = FinalizedLicenseModelFactory.build();
-		const dummyFunc = () => {};
-		let params = {
-			softwareProductList: VSPEditorFactory.buildList(4 ,{vendorId: vendor.id}),
-			vendor,
-			onSelectVSP: dummyFunc,
-			shouldShowOverlay: false,
-			onVendorSelect: dummyFunc,
-			onAddVSP: dummyFunc,
-			onVSPIconClick: dummyFunc,
-		};
+    it('DetailsCatalogView view test when filter obj', () => {
+        let params = {
+            VLMList: FinalizedLicenseModelFactory.buildList(3),
+            VSPList: VSPEditorFactory.buildList(4),
+            onSelectVLM: () => {},
+            onSelectVSP: () => {},
+            onAddVLM: () => {},
+            onAddVSP: () => {},
+            filter: searchValueObj,
+            activeTabName: Object.keys(tabsMapping)[0]
+        };
 
-		let VendorItemView = TestUtils.renderIntoDocument(<VendorItem{...params}/>);
-		expect(VendorItemView).toBeTruthy();
-	});
-
-
-	it('VSPOverlay view test', () => {
-
-		let params = {
-			VSPList: VSPEditorFactory.buildList(10 ,{vendorId: '1'}),
-			onSelectVSP: () => {}
-		};
-
-		let VSPOverlayView = TestUtils.renderIntoDocument(<div><VSPOverlay {...params}/></div>);
-		expect(VSPOverlayView).toBeTruthy();
-	});
-
-	it('CatalogItemDetails view test', () => {
-
-		let params = {
-			catalogItemData: FinalizedLicenseModelFactory.build(),
-			onSelect: () => {},
-			catalogItemTypeClass: catalogItemTypes.LICENSE_MODEL
-		};
-
-		let CatalogItemDetailsView = TestUtils.renderIntoDocument(<div><CatalogItemDetails {...params}/></div>);
-		expect(CatalogItemDetailsView).toBeTruthy();
-	});
-
-	it('DetailsCatalogView view test', () => {
-
-		let params = {
-			VLMList: FinalizedLicenseModelFactory.buildList(3),
-			VSPList:  VSPEditorFactory.buildList(4),
-			onSelectVLM: () => {},
-			onSelectVSP: () => {},
-			onAddVLM: () => {},
-			onAddVSP: () => {},
-			filter: ''
-		};
-
-		let AllCatalog = TestUtils.renderIntoDocument(<DetailsCatalogView {...params}/>);
-		expect(AllCatalog).toBeTruthy();
-	});
+        let AllCatalog = TestUtils.renderIntoDocument(
+            <DetailsCatalogView {...params} />
+        );
+        expect(AllCatalog).toBeTruthy();
+    });
 });
diff --git a/openecomp-ui/test/onboard/test.js b/openecomp-ui/test/onboard/test.js
index b2131ce..0cd703e 100644
--- a/openecomp-ui/test/onboard/test.js
+++ b/openecomp-ui/test/onboard/test.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.
@@ -60,10 +60,19 @@
 
     it('should change searchValue', () => {
         const store = storeCreator();
+        const searchValue = 'test';
+        const searchValueObj = {
+            WORKSPACE: searchValue,
+            CATALOG: ''
+        };
         const expectedStore = OnboardStoreFactory.build({
-            searchValue: 'hello'
+            searchValue: searchValueObj
         });
-        OnboardActionHelper.changeSearchValue(store.dispatch, 'hello');
+        OnboardActionHelper.changeSearchValue(
+            store.dispatch,
+            searchValue,
+            'WORKSPACE'
+        );
         expect(store.getState().onboard).toEqual(expectedStore);
     });
 
