datatable: use a consistent index for the type of value for filtervalues - jscancer - Javascript crap (relatively small)
HTML git clone git://git.codemadness.org/jscancer
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6b5d68bdfbf8b7e5b949ee547e83e3103c6d36e0
DIR parent 126e293e7cb38739b37d7bcaeeb29b640a0b95a1
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
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(-)
---
DIR 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() ]);