Skip to content

Commit f424b11

Browse files
committed
[eslint] fix linting error
1 parent b66dbe4 commit f424b11

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/components/DayPickerKeyboardShortcuts.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ class DayPickerKeyboardShortcuts extends React.PureComponent {
102102
this.handleFocus();
103103
}
104104

105+
handleFocus() {
106+
if (this.hideKeyboardShortcutsButton) {
107+
// automatically move focus into the dialog by moving
108+
// to the only interactive element, the hide button
109+
this.hideKeyboardShortcutsButton.focus();
110+
}
111+
}
112+
105113
onKeyDown(e) {
106114
e.stopPropagation();
107115

@@ -152,14 +160,6 @@ class DayPickerKeyboardShortcuts extends React.PureComponent {
152160
this.hideKeyboardShortcutsButton = ref;
153161
}
154162

155-
handleFocus() {
156-
if (this.hideKeyboardShortcutsButton) {
157-
// automatically move focus into the dialog by moving
158-
// to the only interactive element, the hide button
159-
this.hideKeyboardShortcutsButton.focus();
160-
}
161-
}
162-
163163
render() {
164164
const {
165165
block,

0 commit comments

Comments
 (0)