This commit is contained in:
Jan Prochazka
2020-04-04 08:08:35 +02:00
parent 87b9d87db9
commit a50d1166d4
2 changed files with 4 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ function DataGridRow({
// });
// console.log('RENDER ROW', rowIndex);
const rowDefinition = display.getChangeSetRow(row, insertedRowIndex);
const [matchedField, matchedChangeSetItem] = findExistingChangeSetItem(changeSet, rowDefinition);
const rowUpdated = matchedChangeSetItem ? { ...row, ...matchedChangeSetItem.fields } : row;

View File

@@ -1,3 +1,4 @@
import _ from 'lodash';
import { SeriesSizes } from './SeriesSizes';
import { CellAddress } from './selection';
@@ -108,10 +109,10 @@ export function countVisibleRealColumns(columnSizes, firstVisibleColumnScrollInd
}
export function filterCellForRow(cell, row: number): CellAddress | null {
return cell && cell[0] == row ? cell : null;
return cell && cell[0] == row && _.isString(cell[0]) ? cell : null;
}
export function filterCellsForRow(cells, row: number): CellAddress[] | null {
const res = (cells || []).filter(x => x[0] == row);
const res = (cells || []).filter(x => x[0] == row || _.isString(x[0]));
return res.length > 0 ? res : null;
}