1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #2311 from mabashian/search-close-dropdown

Hide search dropdown after selection
This commit is contained in:
Michael Abashian 2016-06-14 10:31:54 -04:00 committed by GitHub
commit b9c2567cf7
2 changed files with 3 additions and 2 deletions

View File

@ -19,9 +19,10 @@ export default ['$scope', 'Refresh', 'tagSearchService',
}; };
// sets the search type dropdown and hides it // sets the search type dropdown and hides it
$scope.setSearchType = function(type) { $scope.setSearchType = function($event, type) {
$scope.currentSearchType = type; $scope.currentSearchType = type;
$scope.showTypeDropdown = false; $scope.showTypeDropdown = false;
$event.stopPropagation();
}; };
// if the current search type uses a list instead // if the current search type uses a list instead

View File

@ -16,7 +16,7 @@
<div class="TagSearch-dropdownItem" <div class="TagSearch-dropdownItem"
ng-repeat="type in searchTypes track by $index" ng-repeat="type in searchTypes track by $index"
ng-class="{'is-selected': (currentSearchType.id === type.id)}" ng-class="{'is-selected': (currentSearchType.id === type.id)}"
ng-click="setSearchType(type)"> ng-click="setSearchType($event, type)">
{{ type.label }} {{ type.label }}
</div> </div>
</div> </div>