emit value expected by new lists from smart search

This commit is contained in:
John Mitchell
2018-06-20 14:01:49 -04:00
parent 3d42fb1237
commit e89f9b62f5

View File

@@ -77,6 +77,7 @@ function SmartSearchController (
} }
$scope.dataset = res.data; $scope.dataset = res.data;
$scope.collection = res.data.results; $scope.collection = res.data.results;
$scope.$emit('updateDataset', res.data);
}); });
$scope.searchTerm = null; $scope.searchTerm = null;
@@ -200,6 +201,7 @@ function SmartSearchController (
} }
$scope.dataset = data; $scope.dataset = data;
$scope.collection = data.results; $scope.collection = data.results;
$scope.$emit('updateDataset', data);
}) })
.catch(() => revertSearch(unmodifiedQueryset)); .catch(() => revertSearch(unmodifiedQueryset));
@@ -234,6 +236,7 @@ function SmartSearchController (
} }
$scope.dataset = data; $scope.dataset = data;
$scope.collection = data.results; $scope.collection = data.results;
$scope.$emit('updateDataset', data);
}); });
generateSearchTags(); generateSearchTags();
@@ -263,6 +266,7 @@ function SmartSearchController (
} }
$scope.dataset = data; $scope.dataset = data;
$scope.collection = data.results; $scope.collection = data.results;
$scope.$emit('updateDataset', data);
}); });
$scope.searchTags = qs.stripDefaultParams(queryset, defaults); $scope.searchTags = qs.stripDefaultParams(queryset, defaults);