mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Don't include empty cells in the filter select
This commit is contained in:
parent
1c7ca962be
commit
41dd921b41
@ -498,8 +498,8 @@ $.tablesorter.addWidget({
|
||||
|
||||
// build option list
|
||||
for (k = 0; k < arry.length; k++){
|
||||
// replace quotes - fixes #242
|
||||
o += '<option value="' + arry[k].replace(/\"/g, """) + '">' + arry[k] + '</option>';
|
||||
// replace quotes - fixes #242 & ignore empty strings - see http://stackoverflow.com/q/14990971/145346
|
||||
o += arry[k] !== '' ? '<option value="' + arry[k].replace(/\"/g, """) + '">' + arry[k] + '</option>' : '';
|
||||
}
|
||||
$t.find('thead').find('select.' + css + '[data-column="' + i + '"]')[ updating ? 'html' : 'append' ](o);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user