limit results in response

This commit is contained in:
Matthias 2021-07-20 07:49:21 +02:00
parent 1d549bcdbd
commit 289b030f4e

View File

@ -86,9 +86,9 @@ function inventreeDocReady() {
source: function (request, response) { source: function (request, response) {
$.ajax({ $.ajax({
url: '/api/part/', url: '/api/part/',
data: { search: request.term }, data: { search: request.term, limit: 4, offset: 0 },
success: function (data) { success: function (data) {
var transformed = $.map(data, function (el) { var transformed = $.map(data.results, function (el) {
return { return {
label: el.name, label: el.name,
id: el.pk id: el.pk