Skip to content

Commit 549f5cf

Browse files
authored
Merge pull request #445 from ansdelft/fix-changing-disabled-cell
Fix changing disabled cell
2 parents 54f4be4 + 22a6147 commit 549f5cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/component/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function inputEventHandler(evt) {
8181
resetTextareaSize.call(this);
8282
this.change('input', v);
8383
} else {
84-
evt.target.value = '';
84+
evt.target.value = cell.text;
8585
}
8686
} else {
8787
this.inputText = v;

src/core/row.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Rows {
106106

107107
setCellText(ri, ci, text) {
108108
const cell = this.getCellOrNew(ri, ci);
109-
cell.text = text;
109+
if (cell.editable !== false) cell.text = text;
110110
}
111111

112112
// what: all | format | text

0 commit comments

Comments
 (0)