You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/23 03:46:45 UTC

[GitHub] [druid] AshishKapoor commented on a change in pull request #11947: [Web Console] fix deprecated keyboard event method "keyCode" with "key"

AshishKapoor commented on a change in pull request #11947:
URL: https://github.com/apache/druid/pull/11947#discussion_r774299272



##########
File path: web-console/src/views/query-view/query-output/column-rename-input/column-rename-input.tsx
##########
@@ -44,12 +44,12 @@ export const ColumnRenameInput = React.memo(function ColumnRenameInput(
       value={newName}
       onChange={(e: any) => setNewName(e.target.value)}
       onKeyDown={(e: React.KeyboardEvent<HTMLInputElement>) => {
-        switch (e.keyCode) {
-          case 13: // Enter
+        switch (e.key) {
+          case 'enter': // Enter

Review comment:
       Done! Changed to 'Enter' and 'Tab'. Also, removed unwanted comments.
   
   For testing and reference https://css-tricks.com/snippets/javascript/javascript-keycodes/




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org