DEV DD-813 - the search wasn't working for numbers... does now

pull/428/head
Colin Marks 6 years ago
parent b3f99a9fba
commit d6b5dc1729

@ -60,6 +60,8 @@ $.fn.dataTable.ext.deepLink = function(whitelist) {
var pair = search[i].split('='); var pair = search[i].split('=');
var key = decodeURIComponent(pair[0]); var key = decodeURIComponent(pair[0]);
var value = decodeURIComponent(pair[1]); var value = decodeURIComponent(pair[1]);
console.log("key: " + key);
console.log("value: " + value);
// "Casting" // "Casting"
if (value === 'true') { if (value === 'true') {
@ -68,7 +70,8 @@ $.fn.dataTable.ext.deepLink = function(whitelist) {
else if (value === 'false') { else if (value === 'false') {
value = false; value = false;
} }
else if (!value.match(/[^\d]/)) { else if (!value.match(/[^\d]/) && key !== 'search.search') {
// don't convert if searching or it'll break the search
value = value * 1; value = value * 1;
} }
else if (value.indexOf('{') === 0 || value.indexOf('[') === 0) { else if (value.indexOf('{') === 0 || value.indexOf('[') === 0) {

Loading…
Cancel
Save