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:
commit
b9c2567cf7
@ -19,9 +19,10 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
||||
};
|
||||
|
||||
// sets the search type dropdown and hides it
|
||||
$scope.setSearchType = function(type) {
|
||||
$scope.setSearchType = function($event, type) {
|
||||
$scope.currentSearchType = type;
|
||||
$scope.showTypeDropdown = false;
|
||||
$event.stopPropagation();
|
||||
};
|
||||
|
||||
// if the current search type uses a list instead
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div class="TagSearch-dropdownItem"
|
||||
ng-repeat="type in searchTypes track by $index"
|
||||
ng-class="{'is-selected': (currentSearchType.id === type.id)}"
|
||||
ng-click="setSearchType(type)">
|
||||
ng-click="setSearchType($event, type)">
|
||||
{{ type.label }}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user