Skip to content

Commit

Permalink
fix: add completeEdit arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Apr 30, 2024
1 parent 9f68e3e commit ecd59e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vtable/src/event/listener/container-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function bindContainerDomListener(eventManager: EventManager) {
(table as ListTableAPI).editorManager.editingEditor
) {
// 开启了方向键切换编辑单元格 并且当前已经在编辑状态下 切换到下一个需先退出再进入下个单元格的编辑
(table as ListTableAPI).editorManager.completeEdit();
(table as ListTableAPI).editorManager.completeEdit(e);
table.getElement().focus();
if ((table as ListTableAPI).getEditor(targetCol, targetRow)) {
(table as ListTableAPI).editorManager.startEditCell(targetCol, targetRow);
Expand All @@ -89,7 +89,7 @@ export function bindContainerDomListener(eventManager: EventManager) {
} else if (e.key === 'Enter') {
// 如果按enter键 可以结束当前的编辑 或开启编辑选中的单元格(仅限单选)
if ((table as ListTableAPI).editorManager.editingEditor) {
(table as ListTableAPI).editorManager.completeEdit();
(table as ListTableAPI).editorManager.completeEdit(e);
table.getElement().focus();
} else {
if (
Expand Down Expand Up @@ -126,7 +126,7 @@ export function bindContainerDomListener(eventManager: EventManager) {
}
table.selectCell(targetCol, targetRow);
if ((table as ListTableAPI).editorManager.editingEditor) {
(table as ListTableAPI).editorManager.completeEdit();
(table as ListTableAPI).editorManager.completeEdit(e);
table.getElement().focus();
if ((table as ListTableAPI).getEditor(targetCol, targetRow)) {
(table as ListTableAPI).editorManager.startEditCell(targetCol, targetRow);
Expand Down

0 comments on commit ecd59e5

Please sign in to comment.