Skip to content

Commit e3a9b80

Browse files
authored
return true (cancel) the enter key event in typeahead (#1804)
1 parent e2800b3 commit e3a9b80

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

frontend/app/modals/conntypeahead.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ const ChangeConnectionBlockModal = React.memo(
465465
globalStore.set(changeConnModalAtom, false);
466466
globalRefocusWithTimeout(10);
467467
}
468+
setRowIndex(0);
469+
return true;
468470
}
469471
if (keyutil.checkKeyPressed(waveEvent, "Escape")) {
470472
globalStore.set(changeConnModalAtom, false);
@@ -481,6 +483,7 @@ const ChangeConnectionBlockModal = React.memo(
481483
return true;
482484
}
483485
setRowIndex(0);
486+
return false;
484487
},
485488
[changeConnModalAtom, viewModel, blockId, connSelected, selectionList]
486489
);

0 commit comments

Comments
 (0)