File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ function fillFilters() {
123
123
var select = document . querySelector ( "select#text" + filter ) ;
124
124
var option = document . createElement ( "option" ) ;
125
125
option . text = option . value = "Select a filter" ;
126
- option . disabled = option . selected = " true" ;
126
+ option . disabled = option . selected = true ;
127
127
select . add ( option ) ;
128
128
129
129
unique . forEach ( function ( value ) {
@@ -132,6 +132,11 @@ function fillFilters() {
132
132
select . add ( option ) ;
133
133
select . disabled = false ;
134
134
} ) ;
135
+
136
+ if ( select . length == 2 ) {
137
+ // One actual option, first is disabled "Select" text
138
+ select . children [ 1 ] . selected = true ;
139
+ }
135
140
} ) ;
136
141
}
137
142
@@ -209,7 +214,7 @@ function showTable(response) {
209
214
var filterList = document . createElement ( "select" ) ;
210
215
filterList . id = "text" + filter ;
211
216
filterList . name = filter ;
212
- filterList . disabled = " false" ; // until content is loaded
217
+ filterList . disabled = false ; // until content is loaded
213
218
214
219
filterList . addEventListener ( "change" , function ( ) {
215
220
filterTable ( this . name ) ;
You can’t perform that action at this time.
0 commit comments