diff options
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/quickSwitch/Component.tsx | 18 | ||||
-rw-r--r-- | src/features/todos/store.ts | 2 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceDrawerItem.tsx | 3 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceItem.tsx | 1 |
4 files changed, 7 insertions, 17 deletions
diff --git a/src/features/quickSwitch/Component.tsx b/src/features/quickSwitch/Component.tsx index ab07e5d4d..7f6ad6432 100644 --- a/src/features/quickSwitch/Component.tsx +++ b/src/features/quickSwitch/Component.tsx | |||
@@ -88,14 +88,6 @@ interface IState { | |||
88 | @inject('stores', 'actions') | 88 | @inject('stores', 'actions') |
89 | @observer | 89 | @observer |
90 | class QuickSwitchModal extends Component<IProps, IState> { | 90 | class QuickSwitchModal extends Component<IProps, IState> { |
91 | ARROW_DOWN = 40; | ||
92 | |||
93 | ARROW_UP = 38; | ||
94 | |||
95 | ENTER = 13; | ||
96 | |||
97 | TAB = 9; | ||
98 | |||
99 | inputRef = createRef<HTMLDivElement>(); | 91 | inputRef = createRef<HTMLDivElement>(); |
100 | 92 | ||
101 | serviceElements = {}; | 93 | serviceElements = {}; |
@@ -214,12 +206,12 @@ class QuickSwitchModal extends Component<IProps, IState> { | |||
214 | // Handle global key presses to change the selection | 206 | // Handle global key presses to change the selection |
215 | _handleKeyDown(event: KeyboardEvent): void { | 207 | _handleKeyDown(event: KeyboardEvent): void { |
216 | if (ModalState.isModalVisible) { | 208 | if (ModalState.isModalVisible) { |
217 | switch (event.keyCode) { | 209 | switch (event.key) { |
218 | case this.ARROW_DOWN: { | 210 | case 'ArrowDown': { |
219 | this.changeSelected(1); | 211 | this.changeSelected(1); |
220 | break; | 212 | break; |
221 | } | 213 | } |
222 | case this.TAB: { | 214 | case 'Tab': { |
223 | if (event.shiftKey) { | 215 | if (event.shiftKey) { |
224 | this.changeSelected(-1); | 216 | this.changeSelected(-1); |
225 | } else { | 217 | } else { |
@@ -227,11 +219,11 @@ class QuickSwitchModal extends Component<IProps, IState> { | |||
227 | } | 219 | } |
228 | break; | 220 | break; |
229 | } | 221 | } |
230 | case this.ARROW_UP: { | 222 | case 'ArrowUp': { |
231 | this.changeSelected(-1); | 223 | this.changeSelected(-1); |
232 | break; | 224 | break; |
233 | } | 225 | } |
234 | case this.ENTER: { | 226 | case 'Enter': { |
235 | this.openService(this.state.selected); | 227 | this.openService(this.state.selected); |
236 | break; | 228 | break; |
237 | } | 229 | } |
diff --git a/src/features/todos/store.ts b/src/features/todos/store.ts index 882fa6a1e..50704c73f 100644 --- a/src/features/todos/store.ts +++ b/src/features/todos/store.ts | |||
@@ -164,7 +164,7 @@ export default class TodoStore extends FeatureStore { | |||
164 | 164 | ||
165 | // Actions | 165 | // Actions |
166 | 166 | ||
167 | @action _resize = ({ width }) => { | 167 | @action _resize = (width: number) => { |
168 | this._updateSettings({ | 168 | this._updateSettings({ |
169 | width, | 169 | width, |
170 | }); | 170 | }); |
diff --git a/src/features/workspaces/components/WorkspaceDrawerItem.tsx b/src/features/workspaces/components/WorkspaceDrawerItem.tsx index 4fd7662f5..85ed4c38c 100644 --- a/src/features/workspaces/components/WorkspaceDrawerItem.tsx +++ b/src/features/workspaces/components/WorkspaceDrawerItem.tsx | |||
@@ -72,8 +72,7 @@ interface IProps extends WithStylesProps<typeof styles>, WrappedComponentProps { | |||
72 | name: string; | 72 | name: string; |
73 | onClick: MouseEventHandler<HTMLInputElement>; | 73 | onClick: MouseEventHandler<HTMLInputElement>; |
74 | services: string[]; | 74 | services: string[]; |
75 | // eslint-disable-next-line @typescript-eslint/no-invalid-void-type | 75 | onContextMenuEditClick?: (() => void) | null; |
76 | onContextMenuEditClick?: () => void | null; | ||
77 | shortcutIndex: number; | 76 | shortcutIndex: number; |
78 | } | 77 | } |
79 | 78 | ||
diff --git a/src/features/workspaces/components/WorkspaceItem.tsx b/src/features/workspaces/components/WorkspaceItem.tsx index 6c4dd649b..36c6ed2f5 100644 --- a/src/features/workspaces/components/WorkspaceItem.tsx +++ b/src/features/workspaces/components/WorkspaceItem.tsx | |||
@@ -1,4 +1,3 @@ | |||
1 | /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ | ||
2 | import { Component, ReactElement } from 'react'; | 1 | import { Component, ReactElement } from 'react'; |
3 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import withStyles, { WithStylesProps } from 'react-jss'; |