From: Mischa POSLAWSKY Date: Tue, 7 Dec 2010 20:48:44 +0000 (+0100) Subject: browser: search "+" (add any) resets columns X-Git-Tag: v1.4~43 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/61432b88a4121ed5b07335c87b8abba572f6923b browser: search "+" (add any) resets columns --- diff --git a/searchlocal.js b/searchlocal.js index ac38dce..5d7493b 100644 --- a/searchlocal.js +++ b/searchlocal.js @@ -67,6 +67,11 @@ function filtertable(query, action) { query = match[2]; } + if (query == '' && action == 'add') { + // restore all columns if explicitly adding all ("+") + filtercols(table, function(){return true}, 'add'); + // continue to restore rows + } if (/^[a-z_]+$/.test(query) && document.querySelector('.b-a-'+query)) { // column if class b-a-* exists var match = function(th) {