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



##########
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:
       Also now we do not need the comment. Yay for self documenting code.

##########
File path: web-console/src/bootstrap/react-table-custom-pagination.tsx
##########
@@ -123,7 +123,7 @@ export class ReactTableCustomPagination extends 
React.PureComponent<
                   value={tempPage || String(page + 1)}
                   onBlur={this.applyTempPage}
                   onKeyPress={e => {
-                    if (e.which === 13 || e.keyCode === 13) {
+                    if (e.key === 'enter') {

Review comment:
       I think the correct string here is `'Enter'` not `'enter'`

##########
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:
       Ditto on the capitalization here and everywhere




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to