From 134783cf629d515f35df39d1e0a583ecf8ffdc56 Mon Sep 17 00:00:00 2001 From: Arielk Date: Mon, 7 May 2018 13:25:29 +0300 Subject: sort version lists by version name Change-Id: I85bd0a8e174d55e0ca6e0f62e2001937474b1450 Issue-ID: SDC-1256 Signed-off-by: Arielk --- .../onboarding/softwareProduct/details/SoftwareProductDetails.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/details') diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js index 8a3279a02c..eb1927fabe 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js @@ -47,6 +47,9 @@ export const mapStateToProps = ({ licenseAgreementList = licensingVersion ? licenseAgreement.licenseAgreementList : []; + const sortedLicensingVersionsList = [...licensingVersionsList].sort( + (a, b) => Number(a.name) > Number(b.name) + ); if (licensingVersion && licensingData && licensingData.licenseAgreement) { let selectedLicenseAgreement = licenseAgreementList.find( la => la.id === licensingData.licenseAgreement @@ -82,7 +85,7 @@ export const mapStateToProps = ({ currentSoftwareProduct, softwareProductCategories, licenseAgreementList, - licensingVersionsList, + licensingVersionsList: sortedLicensingVersionsList, featureGroupsList: filteredFeatureGroupsList, finalizedLicenseModelList, qdata, -- cgit 1.2.3-korg