From 04d8642daf5ec1f4cafc302e0dc799b15962db23 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Mon, 9 Apr 2018 15:04:52 -0400 Subject: [PATCH] update badge count on search --- awx/ui/client/features/templates/index.controller.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/features/templates/index.controller.js b/awx/ui/client/features/templates/index.controller.js index fd0850d582..5f305345a9 100644 --- a/awx/ui/client/features/templates/index.controller.js +++ b/awx/ui/client/features/templates/index.controller.js @@ -1,12 +1,19 @@ -function IndexTemplatesController (strings, dataset) { +function IndexTemplatesController ($scope, strings, dataset) { let vm = this; vm.strings = strings; vm.count = dataset.data.count; + + $scope.$on('updateDataset', (e, { count }) => { + if (count) { + vm.count = count; + } + }); } IndexTemplatesController.$inject = [ + '$scope', 'TemplatesStrings', - 'Dataset' + 'Dataset', ]; export default IndexTemplatesController;