mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
munge placeholder from select2 typeahead search bar
This commit is contained in:
parent
fbd03287ea
commit
b8ed41fa82
@ -636,6 +636,22 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
|
||||
if (!multiple) {
|
||||
config.minimumResultsForSearch = 1;
|
||||
config.matcher = function(params, data) {
|
||||
// If there are no search terms, return all of the data
|
||||
if ($.trim(params.term) === '' &&
|
||||
data.text.indexOf("Choose an") === -1) {
|
||||
return data;
|
||||
}
|
||||
|
||||
// Do not display the item if there is no 'text' property
|
||||
if (typeof data.text === 'undefined' ||
|
||||
data.text.indexOf("Choose an") > -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Return `null` if the term should not be displayed
|
||||
return null;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user