2
0
mirror of https://github.com/frappe/books.git synced 2024-12-26 12:28:12 +00:00

FIX: Enter pressing on a cell with a value error

This commit is contained in:
thefalconx33 2019-08-05 14:56:16 +05:30
parent a531450033
commit d9b5e56072

View File

@ -99,7 +99,8 @@ export default {
enterPressOnCell() { enterPressOnCell() {
const { index, fieldname } = this.currentlyFocused; const { index, fieldname } = this.currentlyFocused;
if (this.isEditing(index, fieldname)) { if (this.isEditing(index, fieldname)) {
this.deactivateEditing(); // FIX: enter pressing on a cell with a value throws error.
// this.deactivateEditing();
this.activateFocus(index, fieldname); this.activateFocus(index, fieldname);
} else { } else {
this.activateEditing(index, fieldname); this.activateEditing(index, fieldname);
@ -212,7 +213,8 @@ export default {
}; };
}, },
activateFocus(i, fieldname) { activateFocus(i, fieldname) {
this.deactivateEditing(); // FIX: enter pressing on a cell with a value throws error.
// this.deactivateEditing();
const docfield = this.columns.find(c => c.fieldname === fieldname); const docfield = this.columns.find(c => c.fieldname === fieldname);
this.currentlyFocused = { this.currentlyFocused = {
index: i, index: i,