mirror of
https://github.com/frappe/books.git
synced 2025-02-14 09:50:26 +00:00
Table: fix enterPressOnCell
This commit is contained in:
parent
15fca37c39
commit
b1190eb060
@ -28,7 +28,7 @@
|
|||||||
:ref="column.fieldname + i"
|
:ref="column.fieldname + i"
|
||||||
@click="activateFocus(i, column.fieldname)"
|
@click="activateFocus(i, column.fieldname)"
|
||||||
@dblclick="activateEditing(i, column.fieldname)"
|
@dblclick="activateEditing(i, column.fieldname)"
|
||||||
@keydown.enter="enterPressOnCell(i, column.fieldname)"
|
@keydown.enter="enterPressOnCell()"
|
||||||
@keydown.shift.tab="focusPreviousCell(i, column.fieldname)"
|
@keydown.shift.tab="focusPreviousCell(i, column.fieldname)"
|
||||||
@keydown.tab="focusNextCell(i, column.fieldname)"
|
@keydown.tab="focusNextCell(i, column.fieldname)"
|
||||||
@keydown.left="focusPreviousCell(i, column.fieldname)"
|
@keydown.left="focusPreviousCell(i, column.fieldname)"
|
||||||
@ -93,12 +93,13 @@ export default {
|
|||||||
this.deactivateEditing();
|
this.deactivateEditing();
|
||||||
this.activateFocus(i, fieldname);
|
this.activateFocus(i, fieldname);
|
||||||
},
|
},
|
||||||
enterPressOnCell(i, fieldname) {
|
enterPressOnCell() {
|
||||||
if (this.isEditing(i, fieldname)) {
|
const { index, fieldname } = this.currentlyFocused;
|
||||||
|
if (this.isEditing(index, fieldname)) {
|
||||||
this.deactivateEditing();
|
this.deactivateEditing();
|
||||||
this.activateFocus(i, fieldname);
|
this.activateFocus(index, fieldname);
|
||||||
} else {
|
} else {
|
||||||
this.activateEditing(i, fieldname);
|
this.activateEditing(index, fieldname);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
focusPreviousCell(i, fieldname) {
|
focusPreviousCell(i, fieldname) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user