From e36039b03fd8b662fb4d16eee7a10e13f91fbd18 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 30 Sep 2021 20:15:54 +1000 Subject: [PATCH] Server-side pagination for part category search results --- InvenTree/templates/InvenTree/search.html | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/InvenTree/templates/InvenTree/search.html b/InvenTree/templates/InvenTree/search.html index 0fba0add0d..483a9a4e0f 100644 --- a/InvenTree/templates/InvenTree/search.html +++ b/InvenTree/templates/InvenTree/search.html @@ -126,24 +126,10 @@ addItem('category', '{% trans "Part Categories" %}', 'fa-sitemap'); - $("#table-category").inventreeTable({ - url: "{% url 'api-part-category-list' %}", - queryParams: { + loadPartCategoryTable($("#table-category"), { + params: { original_search: "{{ query }}", - }, - columns: [ - { - field: 'name', - title: '{% trans "Name" %}', - formatter: function(value, row, index, field) { - return renderLink(value, '/part/category/' + row.pk + '/'); - }, - }, - { - field: 'description', - title: '{% trans "Description" %}', - }, - ], + } }); addItem('manufacturer-part', '{% trans "Manufacturer Parts" %}', 'fa-toolbox');