diff --git a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx index 203fb6ef30..626f5506af 100644 --- a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx +++ b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx @@ -852,27 +852,25 @@ export class KupInputPanel { this.#originalData.rows[0].cells[cellId].value ); - updated.rows = tableValue.rows - .map((row, i) => - editableColsId.reduce((cells, colId) => { - const changed = - row.cells[colId].value !== - beforeTableValue.rows[i].cells[colId].value; - - if (changed) { - return { - ...cells, - [colId]: { - ...beforeTableValue.rows[i].cells[colId], - value: row.cells[colId].value, - }, - }; - } + updated.rows = tableValue.rows.map((row, i) => + editableColsId.reduce((cells, colId) => { + const changed = + row.cells[colId].value !== + beforeTableValue.rows[i].cells[colId].value; - return cells; - }, {}) - ) - .filter((row) => Object.keys(row).length); + if (changed) { + return { + ...cells, + [colId]: { + ...beforeTableValue.rows[i].cells[colId], + value: row.cells[colId].value, + }, + }; + } + + return cells; + }, {}) + ); return updated; } catch (e) {