Permalink
Browse files

Merge pull request #36 from ikedam/feature/JENKINS-22316_autocomplete…

…Dropdown

[JENKINS-22316] Show candidates containing the input value
  • Loading branch information...
ikedam committed Feb 18, 2018
2 parents 3bc82bf + 1f7ec3a commit 584197ec252e86a5f3242b46000edf2b683a0cb0
@@ -46,7 +46,7 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>
<j:scope>
<j:set var="attrs" value="${attrs}" /> <!-- prepareDatabinding のために必要 -->
<j:set var="attrs" value="${attrs}" /> <!-- Required for prepareDatabinding -->
<j:set var="defValue" value="${attrs.value ?: instance[attrs.field]}" />
<f:prepareDatabinding/>

@@ -51,11 +51,13 @@ Behaviour.register({"SELECT.staticCombobox": function(e) {

/*
* Changes from the original 3:
* Original behavior: Show candidates that matches the current incomplete input.
* Changed behavior : Show all the candidates, not concerning with the current incomplete input.
* Original behavior: Show candidates that start with the current incomplete input.
* Changed behavior : Show candidates that contain the current incomplete input.
*/
var c = new ComboBox(e,function(value) {
return items;
return items.filter(function (item) {
return item.indexOf(value) > -1;
});
}, {});

/*

0 comments on commit 584197e

Please sign in to comment.