From 0b451b24990e73cb6732f4a7fa0c97e2dcdfefbc Mon Sep 17 00:00:00 2001 From: Veronika Tsygankova Date: Tue, 28 Jul 2026 09:50:35 +0300 Subject: [PATCH] =?UTF-8?q?[AURORA-894]=20-=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/RealtimeTable/utils/cellUtils.js | 7 +++++-- web/src/components/RealtimeTable/utils/rowUtils.js | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web/src/components/RealtimeTable/utils/cellUtils.js b/web/src/components/RealtimeTable/utils/cellUtils.js index 304a8ab..6609f72 100644 --- a/web/src/components/RealtimeTable/utils/cellUtils.js +++ b/web/src/components/RealtimeTable/utils/cellUtils.js @@ -1,3 +1,5 @@ +import { getDataRowId } from "./rowUtils"; + export function setNewValueToData(data, colId, rowId, value) { let targetObject = data; if (rowId && rowId.length) { @@ -167,8 +169,9 @@ export function deleteRow(data, lineId) { function findAndDelete(rows) { for (let i = 0; i < rows.length; i++) { const row = rows[i]; + const rowId = getDataRowId(row.data); - if (row.data.line_id == lineId) { + if (rowId == lineId) { rowDeleteSortOrder = row.sort_order; rows.splice(i, 1); i--; @@ -179,7 +182,7 @@ export function deleteRow(data, lineId) { } if (row.subRows && Array.isArray(row.subRows) && row.subRows.length > 0) { - const found = findAndDelete(row.subRows); + findAndDelete(row.subRows); } } } diff --git a/web/src/components/RealtimeTable/utils/rowUtils.js b/web/src/components/RealtimeTable/utils/rowUtils.js index 5ba9a51..1f43dc3 100644 --- a/web/src/components/RealtimeTable/utils/rowUtils.js +++ b/web/src/components/RealtimeTable/utils/rowUtils.js @@ -1,5 +1,9 @@ +export function getDataRowId(data) { + return data?.id || data?.line_id; +} + export function getRowId(row) { - return row.original.data.id || row.original.data.line_id; + return getDataRowId(row.original.data); } export function isVspRow(row) {