mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Merge pull request #2311 from mabashian/search-close-dropdown
Hide search dropdown after selection
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user