mirror of https://github.com/apache/cloudstack.git
CS-15572: Fix page index for list view filters
This fixes an issue where the page index is not reset back 1 when activating the search or filter functionality, causing truncation when trying to scroll down to later pages.
This commit is contained in:
parent
14fb597131
commit
843b3dceaf
|
|
@ -971,8 +971,8 @@
|
|||
if (!options) options = {};
|
||||
var context = options.context;
|
||||
var reorder = options.reorder;
|
||||
|
||||
var $tbody = $table.find('tbody');
|
||||
|
||||
if (!loadArgs) loadArgs = {
|
||||
page: 1,
|
||||
filterBy: {
|
||||
|
|
@ -1260,6 +1260,7 @@
|
|||
});
|
||||
|
||||
var search = function() {
|
||||
page = 1;
|
||||
loadBody(
|
||||
$table,
|
||||
listViewData.dataProvider,
|
||||
|
|
@ -1267,7 +1268,7 @@
|
|||
listViewData.fields,
|
||||
false,
|
||||
{
|
||||
page: 1,
|
||||
page: page,
|
||||
filterBy: {
|
||||
kind: $listView.find('select[id=filterBy]').val(),
|
||||
search: {
|
||||
|
|
@ -1314,7 +1315,8 @@
|
|||
var context = $listView.data('view-args').context;
|
||||
|
||||
if (loadMoreData) {
|
||||
page = page + 1;
|
||||
page = page + 1;
|
||||
|
||||
loadBody($table, listViewData.dataProvider, listViewData.preFilter, listViewData.fields, true, {
|
||||
context: context,
|
||||
page: page,
|
||||
|
|
|
|||
Loading…
Reference in New Issue