[dashboard] Refresh facet result when reordering sub-facets
@@ -650,6 +650,11 @@ var Collection = function (vm, collection) {
vm.search();
});
}
+ if (facet.properties.facets) {
+ facet.properties.facets.subscribe(function(newValue) {
+ vm.search();
+ });
+ }
// For Hue 4 facets only
if (typeof facet.template != 'undefined') {
@@ -712,6 +717,7 @@ var Collection = function (vm, collection) {
vm.search();
});
}
+
if (typeof facet.properties.facets != 'undefined') {
$.each(facet.properties.facets(), function (index, pivotFacet) {
if (pivotFacet.aggregate && pivotFacet.aggregate.function) {
@@ -723,6 +729,7 @@ var Collection = function (vm, collection) {
}
});
+
self.template.rows.subscribe(function() {
vm.search();
});
@@ -892,7 +899,6 @@ var Collection = function (vm, collection) {
vm.search();
});
facet.properties.facets.push(pivot);
- vm.search();
}
}
@@ -920,14 +926,11 @@ var Collection = function (vm, collection) {
vm.search();
});
facet.properties.facets.push(pivot);
- vm.search();
}
}
self.removePivotFacetValue = function(facet) {
facet['pivot_facet'].properties.facets.remove(facet['value']);
-
- vm.search();
}
self.removeFacet = function (widget_id) {
