mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
limit results in response
This commit is contained in:
parent
1d549bcdbd
commit
289b030f4e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user