diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-16 15:04:51 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-16 15:04:51 +0300 |
commit | de14439ea4b7cc7e313af985ac6eaa95e4d0e8c3 (patch) | |
tree | 8ad4bb78f7ab4be99361d5f1dbf32fe467140497 /app/assets | |
parent | 8c5a3ffe9d29767eaf2e75038056efe29579b7bf (diff) |
Enabled remote filter in compare dropdowns
Previously if the project had more than 100 branches or tags it wouldnt display them even after searching.
This now correctly sends an AJAx request to the backend to search for the branches/tags
Closes #29545
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/compare_autocomplete.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/compare_autocomplete.js b/app/assets/javascripts/compare_autocomplete.js index d91bfb1ccbd..72c0d98d47c 100644 --- a/app/assets/javascripts/compare_autocomplete.js +++ b/app/assets/javascripts/compare_autocomplete.js @@ -18,7 +18,8 @@ window.CompareAutocomplete = (function() { return $.ajax({ url: $dropdown.data('refs-url'), data: { - ref: $dropdown.data('ref') + ref: $dropdown.data('ref'), + search: term, } }).done(function(refs) { return callback(refs); @@ -26,7 +27,7 @@ window.CompareAutocomplete = (function() { }, selectable: true, filterable: true, - filterByText: true, + filterRemote: true, fieldName: $dropdown.data('field-name'), filterInput: 'input[type="search"]', renderRow: function(ref) { |