diff --git a/InvenTree/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js index b7cacd5860..f991ed3766 100644 --- a/InvenTree/InvenTree/static/script/inventree/inventree.js +++ b/InvenTree/InvenTree/static/script/inventree/inventree.js @@ -128,81 +128,6 @@ function inventreeDocReady() { attachClipboard('.clip-btn', 'modal-about'); attachClipboard('.clip-btn-version', 'modal-about', 'about-copy-text'); - // Add autocomplete to the search-bar - if ($('#search-bar').exists()) { - $('#search-bar').autocomplete({ - source: function(request, response) { - - var params = { - search: request.term, - limit: user_settings.SEARCH_PREVIEW_RESULTS, - offset: 0, - }; - - if (user_settings.SEARCH_HIDE_INACTIVE_PARTS) { - // Limit to active parts - params.active = true; - } - - $.ajax({ - url: '/api/part/', - data: params, - success: function(data) { - - var transformed = $.map(data.results, function(el) { - return { - label: el.full_name, - id: el.pk, - thumbnail: el.thumbnail, - data: el, - }; - }); - response(transformed); - }, - error: function() { - response([]); - } - }); - }, - create: function() { - $(this).data('ui-autocomplete')._renderItem = function(ul, item) { - - var html = ` -