summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2018-11-04 15:00:34 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-11-04 13:40:10 +0000
commit811fb48f0c31422e93aba218e76ed296fceeb0f0 (patch)
treef31d1aa2be45d6608844670c5d6edd20a8f82585 /openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
parent4eb4059162269fea685136572257a48345873ec7 (diff)
chache result in onboarding
Issue-ID: SDC-1889 Change-Id: I99dc01cc32af99399bc232125b6195b7125e6c61 Signed-off-by: Yarin Dekel <yarind@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx20
1 files changed, 13 insertions, 7 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
index b535595355..c2fb2e7fd8 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 @@ function renderCatalogItems({
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 @@ class DetailsCatalogView extends React.Component {
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 @@ class DetailsCatalogView extends React.Component {
onAddVLM,
onSelectVLM,
onSelectVSP,
- filter = '',
- onMigrate
+ filter,
+ onMigrate,
+ activeTabName
} = this.props;
return (
<CatalogList onAddVLM={onAddVLM} onAddVSP={onAddVSP}>
@@ -82,7 +86,8 @@ class DetailsCatalogView extends React.Component {
filter,
onSelect: onSelectVLM,
onMigrate,
- users
+ users,
+ activeTabName
})}
{renderCatalogItems({
items: VSPList,
@@ -90,7 +95,8 @@ class DetailsCatalogView extends React.Component {
filter,
onSelect: onSelectVSP,
onMigrate,
- users
+ users,
+ activeTabName
})}
</CatalogList>
);