aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/quickSwitch/Component.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-14 19:58:52 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-14 19:58:52 +0200
commit95df3522a15631abc51a4295cae0ea401a8d4e1e (patch)
treee5eb0f368c947683f01458e912f21756fb0d99cb /src/features/quickSwitch/Component.js
parentdocs: add sad270 as a contributor for bug, userTesting [skip ci] (#1941) (diff)
downloadferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.gz
ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.zst
ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.zip
feat: add eslint-plugin-unicorn (#1936)
Diffstat (limited to 'src/features/quickSwitch/Component.js')
-rw-r--r--src/features/quickSwitch/Component.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/features/quickSwitch/Component.js b/src/features/quickSwitch/Component.js
index df2bf968d..f21db0ebd 100644
--- a/src/features/quickSwitch/Component.js
+++ b/src/features/quickSwitch/Component.js
@@ -140,7 +140,7 @@ class QuickSwitchModal extends Component {
140 let services = []; 140 let services = [];
141 if ( 141 if (
142 this.state.search && 142 this.state.search &&
143 compact(invoke(this.state.search, 'match', /^[a-z0-9]/i)).length > 0 143 compact(invoke(this.state.search, 'match', /^[\da-z]/i)).length > 0
144 ) { 144 ) {
145 // Apply simple search algorythm to list of all services 145 // Apply simple search algorythm to list of all services
146 services = this.props.stores.services.allDisplayed; 146 services = this.props.stores.services.allDisplayed;
@@ -261,7 +261,7 @@ class QuickSwitchModal extends Component {
261 // Wrapped inside timeout to let the modal render first 261 // Wrapped inside timeout to let the modal render first
262 setTimeout(() => { 262 setTimeout(() => {
263 if (this.inputRef.current) { 263 if (this.inputRef.current) {
264 this.inputRef.current.getElementsByTagName('input')[0].focus(); 264 this.inputRef.current.querySelectorAll('input')[0].focus();
265 } 265 }
266 }, 10); 266 }, 10);
267 267
@@ -273,7 +273,7 @@ class QuickSwitchModal extends Component {
273 // search query change when modal not visible 273 // search query change when modal not visible
274 setTimeout(() => { 274 setTimeout(() => {
275 if (this.inputRef.current) { 275 if (this.inputRef.current) {
276 this.inputRef.current.getElementsByTagName('input')[0].blur(); 276 this.inputRef.current.querySelectorAll('input')[0].blur();
277 } 277 }
278 }, 100); 278 }, 100);
279 279