From d6b5dc172978d74b55f86e53589ec3590a1629b9 Mon Sep 17 00:00:00 2001 From: Colin Marks Date: Fri, 1 Mar 2019 12:02:50 +0000 Subject: [PATCH] DEV DD-813 - the search wasn't working for numbers... does now --- features/deepLink/dataTables.deepLink.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/features/deepLink/dataTables.deepLink.js b/features/deepLink/dataTables.deepLink.js index 2ae6be7..2e7a409 100644 --- a/features/deepLink/dataTables.deepLink.js +++ b/features/deepLink/dataTables.deepLink.js @@ -60,6 +60,8 @@ $.fn.dataTable.ext.deepLink = function(whitelist) { var pair = search[i].split('='); var key = decodeURIComponent(pair[0]); var value = decodeURIComponent(pair[1]); + console.log("key: " + key); + console.log("value: " + value); // "Casting" if (value === 'true') { @@ -68,7 +70,8 @@ $.fn.dataTable.ext.deepLink = function(whitelist) { else if (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; } else if (value.indexOf('{') === 0 || value.indexOf('[') === 0) {