We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2037981 commit d9a3cfcCopy full SHA for d9a3cfc
options/difficulyDropdown.js
@@ -77,11 +77,15 @@ class DifficultyDropdown {
77
}
78
79
selectDifficulty(difficulty) {
80
- // TODO: Finish function
+ this.selectedDifficulty = difficulty;
81
+
82
+ const textSpan = this.selected.querySelector('.difficulty-dropdown-selected-text');
83
+ if (textSpan) textSpan.textContent = difficulty === 'all' ? 'All Difficulties' : difficulty;
84
+ this.closeList();
85
86
87
toggleList() {
88
89
90
91
closeList() {
@@ -93,4 +97,4 @@ class DifficultyDropdown {
93
97
94
98
95
99
96
-window.DifficultyDropdown = DifficultyDropdown;
100
+window.DifficultyDropdown = DifficultyDropdown;
0 commit comments