datatable: use a consistent index for the type of value for filtervalues - jsca… | |
git clone git://git.codemadness.org/jscancer | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6b5d68bdfbf8b7e5b949ee547e83e3103c6d36e0 | |
parent 126e293e7cb38739b37d7bcaeeb29b640a0b95a1 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 26 Jul 2019 10:14:59 +0200 | |
datatable: use a consistent index for the type of value for filtervalues | |
this makes sure when a data-value attribute is set (or not) the type of value | |
is always stored in the same index. | |
Diffstat: | |
M datatable/datatable.js | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/datatable/datatable.js b/datatable/datatable.js | |
@@ -182,7 +182,7 @@ function datatable_data_parse(d) { | |
// and data-value (case-insensitive). | |
var s = td.textContent || td.innerText; | |
if (typeof(v) != "undefined" && v !== null) { | |
- fv.push([ v.toLowerCase(), s.toLowerCase() ]); | |
+ fv.push([ s.toLowerCase(), v.toLowerCase() ]); | |
values.push(d.cols[j].parsefn(v)); | |
} else { | |
fv.push([ s.toLowerCase() ]); |