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