From: miriame Date: Sun, 5 May 2019 08:28:34 +0000 (+0300) Subject: fix bug: [SDC-2275]Service properties - issue on save multiple properties X-Git-Tag: 1.5.0~35 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=51bc2809a58a24b20d851c10d21bcccf2a849e6b;p=sdc.git fix bug: [SDC-2275]Service properties - issue on save multiple properties Issue-ID: SDC-2275 Change-Id: If9e44517727547dbf2bd28ecbaa96be6114bd848 Signed-off-by: miriame --- diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts index 037b7f4963..38278c9d4f 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts @@ -532,7 +532,8 @@ export class PropertiesAssignmentComponent { handleSuccess = (response) => { // reset each changed property with new value and remove it from changed properties list response.forEach((resProp) => { - const changedProp = this.changedData.shift(); + const changedProp = _.find(this.changedData, changedDataObject => changedDataObject.uniqueId === resProp.uniqueId); + this.changedData = _.filter(this.changedData, changedDataObject => changedDataObject.uniqueId !== resProp.uniqueId); this.propertiesUtils.resetPropertyValue(changedProp, resProp.value); }); resolve(response);