mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
fixed job details search bar when empty input or duplicate input
This commit is contained in:
parent
431ee9bbbf
commit
6b1129ce1d
@ -64,9 +64,21 @@ function removeSearchTag (index) {
|
||||
}
|
||||
|
||||
function submitSearch () {
|
||||
// empty input, not submit new search, return.
|
||||
if (!vm.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentQueryset = getCurrentQueryset();
|
||||
// check duplicate , see if search input already exists in current search tags
|
||||
if (currentQueryset.search) {
|
||||
if (currentQueryset.search.includes(vm.value)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const searchInputQueryset = qs.getSearchInputQueryset(vm.value, isFilterable);
|
||||
|
||||
const modifiedQueryset = qs.mergeQueryset(currentQueryset, searchInputQueryset);
|
||||
|
||||
reloadQueryset(modifiedQueryset, strings.get('search.REJECT_INVALID'));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user