mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for paginated tables
This commit is contained in:
parent
7cf1715e2b
commit
4ff1c690cc
@ -145,10 +145,7 @@ $.fn.inventreeTable = function(options) {
|
|||||||
var filters = options.queryParams || options.filters || {};
|
var filters = options.queryParams || options.filters || {};
|
||||||
|
|
||||||
options.queryParams = function(params) {
|
options.queryParams = function(params) {
|
||||||
for (var key in filters) {
|
|
||||||
params[key] = filters[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Override the way that we ask the server to sort results
|
// Override the way that we ask the server to sort results
|
||||||
// It seems bootstrap-table does not offer a "native" way to do this...
|
// It seems bootstrap-table does not offer a "native" way to do this...
|
||||||
if ('sort' in params) {
|
if ('sort' in params) {
|
||||||
@ -170,6 +167,15 @@ $.fn.inventreeTable = function(options) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var key in filters) {
|
||||||
|
params[key] = filters[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add "order" back in (if it was originally specified by InvenTree)
|
||||||
|
// Annoyingly, "order" shadows some field names in InvenTree...
|
||||||
|
if ('order' in filters) {
|
||||||
|
params['order'] = filters['order'];
|
||||||
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user