From fd03b4068d9b481a7c9b55abc01b63b1414f6b8f Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 4 Jul 2022 12:06:56 +1000 Subject: [PATCH] Fix table sorting issues (#3289) - Recent update changed default table pagination to "server" - This broke at least the BOM table, maybe others - Revert the behaviour to previous to observe old defaults - Update pagination mode for attachment tables specifically --- InvenTree/templates/js/translated/attachment.js | 1 + InvenTree/templates/js/translated/tables.js | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/InvenTree/templates/js/translated/attachment.js b/InvenTree/templates/js/translated/attachment.js index 19c04b4a80..bef49961a6 100644 --- a/InvenTree/templates/js/translated/attachment.js +++ b/InvenTree/templates/js/translated/attachment.js @@ -196,6 +196,7 @@ function loadAttachmentTable(url, options) { search: true, queryParams: options.filters || {}, uniqueId: 'pk', + sidePagination: 'server', onPostBody: function() { // Add callback for 'edit' button diff --git a/InvenTree/templates/js/translated/tables.js b/InvenTree/templates/js/translated/tables.js index 661b3f6f68..befe967860 100644 --- a/InvenTree/templates/js/translated/tables.js +++ b/InvenTree/templates/js/translated/tables.js @@ -375,10 +375,6 @@ $.fn.inventreeTable = function(options) { options.totalField = 'count'; options.dataField = 'results'; - if (options.sidePagination == null) { - options.sidePagination = 'server'; - } - } else { options.pagination = false; }