From 63e25815e91e6b54ef20cb0cb5fe98ba372f33f8 Mon Sep 17 00:00:00 2001 From: Nicholas Tomlin Date: Tue, 28 Jun 2016 10:48:38 -0400 Subject: [PATCH 1/2] sort doesn't remove filters previously, sorting the table by name, city, etc. would clear any filter in the input text field without removing it. now the filter still applies after sorting --- js/sheetsee.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/sheetsee.js b/js/sheetsee.js index bd73334..55a25a4 100644 --- a/js/sheetsee.js +++ b/js/sheetsee.js @@ -16144,7 +16144,7 @@ function sortThings(opts, sorter, sorted, tableDiv) { return 0 }) if (sorted === "descending") opts.data.reverse() - makeTable(opts) + searchTable(opts, document.getElementById("tableFilter").value) var header $(tableDiv + " .tHeader").each(function(i, el){ var contents = resolveDataTitle($(el).text()) @@ -16290,4 +16290,4 @@ function table(data, opts) { $(opts.tableDiv).html(tableContents) } },{"icanhaz":2}]},{},[1]) -; \ No newline at end of file +; From 9d5df929667f831074ad6093fce7fa336bc6b649 Mon Sep 17 00:00:00 2001 From: Nicholas Tomlin Date: Wed, 29 Jun 2016 11:50:49 -0400 Subject: [PATCH 2/2] clear button resets URL previously, hitting the clear button would remove search criteria but leave the URL intact .. so if you refreshed the page after hitting clear the search would come back. now that's gone. --- js/sheetsee.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/sheetsee.js b/js/sheetsee.js index 55a25a4..27851bd 100644 --- a/js/sheetsee.js +++ b/js/sheetsee.js @@ -16112,6 +16112,7 @@ module.exports.initiateTableFilter = function(opts) { $(this.id + ".noMatches").css("visibility", "hidden") $(this.id + opts.filterDiv).val("") makeTable(opts) + window.location.hash = "" }) $(opts.filterDiv).keyup(function(e) { var text = $(e.target).val()