aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Larsen <me@supergrecko.com>2021-12-12 16:43:19 +0000
committerGitHub <noreply@github.com>2021-12-12 17:43:19 +0100
commit0b32c7e9167188438d6437969de543d060de423f (patch)
tree1d15a9934c84ad1458a8a27854bf27f7141898d3
parent845b63344198b3c72c7e25b50eacbe875f450d97 (diff)
downloadcompiler-explorer-gh-1364.tar.gz
compiler-explorer-gh-1364.zip
Automatically enable text search for language dropdown (#3162)gh-1364
-rw-r--r--static/explorer.scss2
-rw-r--r--static/panes/editor.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/static/explorer.scss b/static/explorer.scss
index 00b860bec..75a7aeb14 100644
--- a/static/explorer.scss
+++ b/static/explorer.scss
@@ -372,7 +372,7 @@ pre.content.wrap * {
.change-language {
line-height: 14px;
- min-width: 150px !important;
+ min-width: 200px !important;
}
.change-language .ts-input {
diff --git a/static/panes/editor.js b/static/panes/editor.js
index 56057f623..891ead522 100644
--- a/static/panes/editor.js
+++ b/static/panes/editor.js
@@ -130,11 +130,13 @@ function Editor(hub, state, container) {
valueField: 'id',
labelField: 'name',
searchField: ['name'],
+ placeholder: '🔍 Select a language...',
options: _.map(usableLanguages, _.identity),
items: [this.currentLanguage.id],
dropdownParent: 'body',
- plugins: ['input_autogrow'],
+ plugins: ['dropdown_input'],
onChange: _.bind(this.onLanguageChange, this),
+ closeAfterSelect: true,
});