From c5c8c0c2200da9b49cbe628b84a032bc4c5e5f9a Mon Sep 17 00:00:00 2001 From: Romain Rigaux Date: Wed, 13 May 2015 17:28:20 -0700 Subject: [PATCH] [search] Update result rows when translating field columns --- apps/search/src/search/static/search/js/search.ko.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/search/src/search/static/search/js/search.ko.js b/apps/search/src/search/static/search/js/search.ko.js index 9d42d8896b0..3c49c2f9dc7 100644 --- a/apps/search/src/search/static/search/js/search.ko.js +++ b/apps/search/src/search/static/search/js/search.ko.js @@ -884,6 +884,7 @@ var Collection = function (vm, collection) { self.translateSelectedField = function (index, direction) { var array = self.template.fieldsSelected(); + vm.resultsHash = ''; if (direction == 'left') { self.template.fieldsSelected.splice(index - 1, 2, array[index], array[index - 1]); @@ -1173,7 +1174,7 @@ var SearchViewModel = function (collection_json, query_json, initial_json) { $.each(data.normalized_facets, function (index, new_facet) { var facet = self.getFacetFromQuery(new_facet.id); - var _hash = ko.mapping.toJSON(new_facet.counts); + var _hash = ko.mapping.toJSON(new_facet); if (! facet.has_data() || facet.hash() != _hash) { facet.counts(new_facet.counts);