From 5842e3f7f244060515b56c8f92dba128b9fc1f20 Mon Sep 17 00:00:00 2001 From: mydu Date: Thu, 27 Jun 2019 12:02:36 +0200 Subject: [PATCH] copy flow row for mutate it with index #58 --- importApp/src/containers/DataModification/DataModification.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/importApp/src/containers/DataModification/DataModification.js b/importApp/src/containers/DataModification/DataModification.js index 3c2b8b4d..8ddfdf01 100644 --- a/importApp/src/containers/DataModification/DataModification.js +++ b/importApp/src/containers/DataModification/DataModification.js @@ -78,10 +78,10 @@ class DataModification extends React.Component { } if(payload.field === 'year') { - const rowNumbers = errors.map((e) => e.rowNumber) + const rowNumbers = errors.map((e) => e.rowNumber); const columnIndex = flows[0].indexOf('year'); const source = [flows[0]].concat(errors.map((e) => { - const row = flows[e.rowNumber -1] + const row = [...flows[e.rowNumber -1]] row[columnIndex] = payload.fixedValues['year']; return row; }));