mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Prevent the click event from bubbling up and keeping the dropdown visible on searches.
This commit is contained in:
parent
3a68a9219a
commit
4159100778
@ -62,7 +62,7 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
||||
};
|
||||
|
||||
// triggers a refilter of the list with the newTag
|
||||
$scope.addTag = function(type) {
|
||||
$scope.addTag = function($event, type) {
|
||||
var newTag = tagSearchService
|
||||
.getTag($scope.currentSearchType,
|
||||
$scope.newSearchTag,
|
||||
@ -81,6 +81,7 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
||||
tags.push(newTag);
|
||||
$scope.updateSearch(tags);
|
||||
}
|
||||
$event.stopPropagation();
|
||||
};
|
||||
|
||||
// triggers a refilter of the list without the oldTag
|
||||
|
@ -29,7 +29,7 @@
|
||||
placeholder="Search">
|
||||
<div class="TagSearch-searchButton"
|
||||
ng-disabled="!newSearchTag"
|
||||
ng-click="addTag()"
|
||||
ng-click="addTag($event)"
|
||||
ng-show="currentSearchType.type === 'text'">
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
@ -50,7 +50,7 @@
|
||||
currentSearchType.type === 'select'">
|
||||
<div class="TagSearch-dropdownItem"
|
||||
ng-repeat="type in currentSearchType.typeOptions track by $index"
|
||||
ng-click="addTag(type)">
|
||||
ng-click="addTag($event, type)">
|
||||
{{ type.label }}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user