From fa0ad38f72794c52a5b505af1e08361c9c611c13 Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Fri, 27 Sep 2024 12:18:07 +0530 Subject: [PATCH] Fixed an issue to allow the Enter key to save data in the result grid text editor. #5307 --- .../static/js/components/QueryToolDataGrid/Editors.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx index d8881e4832a..ca9912fb3b9 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Editors.jsx @@ -246,11 +246,18 @@ export function TextEditor({row, column, onRowChange, onClose}) { } }; + const onkeydown = (e)=>{ + // If only the Enter key is pressed, then save the changes. + if(e.keyCode == 13 && !e.shiftKey) { + onOK(); + } + }; + return ( -