(
tableId: Id,
rowId: Id,
rowMap: RowMap,
cellId: Id,
cell: Cell,
skipMiddleware?: boolean,
)
| 757 | }; |
| 758 | |
| 759 | const setValidCell = ( |
| 760 | tableId: Id, |
| 761 | rowId: Id, |
| 762 | rowMap: RowMap, |
| 763 | cellId: Id, |
| 764 | cell: Cell, |
| 765 | skipMiddleware?: boolean, |
| 766 | ): void => |
| 767 | ifTransformed( |
| 768 | cell, |
| 769 | () => |
| 770 | ifNotUndefined( |
| 771 | skipMiddleware ? undefined : middleware[4], |
| 772 | (willSetCell) => |
| 773 | whileMutating(() => willSetCell(tableId, rowId, cellId, cell)), |
| 774 | () => cell, |
| 775 | ), |
| 776 | (cell) => { |
| 777 | if (!collHas(rowMap, cellId)) { |
| 778 | cellIdsChanged(tableId, rowId, cellId, 1); |
| 779 | } |
| 780 | const oldCell = mapGet(rowMap, cellId); |
| 781 | if (cell !== oldCell) { |
| 782 | cellChanged(tableId, rowId, cellId, oldCell, cell); |
| 783 | mapSet(rowMap, cellId, cell); |
| 784 | } |
| 785 | }, |
| 786 | ); |
| 787 | |
| 788 | const setCellIntoNewRow = ( |
| 789 | tableId: Id, |
no test coverage detected
searching dependent graphs…