Skip to content

Commit

Permalink
[search] Update result rows when translating field columns
Browse files Browse the repository at this point in the history
  • Loading branch information
romainr committed May 19, 2015
1 parent e920d27 commit c5c8c0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/search/src/search/static/search/js/search.ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c5c8c0c

Please sign in to comment.