Compare commits

..

No commits in common. "95f9e1a0d96c13bc68675158317d3e10a57a1a62" and "b4139cd66af78e75b56287f8ca23768e707933c6" have entirely different histories.

2 changed files with 3 additions and 10 deletions

View File

@ -1,5 +1,3 @@
import { getDataRowId } from "./rowUtils";
export function setNewValueToData(data, colId, rowId, value) {
let targetObject = data;
if (rowId && rowId.length) {
@ -169,9 +167,8 @@ 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 (rowId == lineId) {
if (row.data.line_id == lineId) {
rowDeleteSortOrder = row.sort_order;
rows.splice(i, 1);
i--;
@ -182,7 +179,7 @@ export function deleteRow(data, lineId) {
}
if (row.subRows && Array.isArray(row.subRows) && row.subRows.length > 0) {
findAndDelete(row.subRows);
const found = findAndDelete(row.subRows);
}
}
}

View File

@ -1,9 +1,5 @@
export function getDataRowId(data) {
return data?.id || data?.line_id;
}
export function getRowId(row) {
return getDataRowId(row.original.data);
return row.original.data.id || row.original.data.line_id;
}
export function isVspRow(row) {