Skip to content

Commit 2c49b53

Browse files
IchHabRechtmschwemer
authored andcommitted
[BUGFIX] Allow pagination with filter values
1 parent 8f5e74a commit 2c49b53

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Classes/Controller/ModuleController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function listAction(): ResponseInterface
9494
$formUids = $this->mailRepository->findGroupedFormUidsToGivenPageUid((int)$this->id);
9595
$mails = $this->mailRepository->findAllInPid((int)$this->id, $this->settings, $this->piVars);
9696

97-
$currentPage = (int)($this->request->getQueryParams()['currentPage'] ?? 1);
97+
$currentPage = (int)($this->request->getParsedBody()['currentPage'] ?? $this->request->getQueryParams()['currentPage'] ?? 1);
9898
$currentPage = $currentPage > 0 ? $currentPage : 1;
9999

100100
$itemsPerPage = (int)($this->settings['perPage'] ?? 10);

Resources/Private/Build/JavaScript/Backend.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function PowermailBackend($, Modal) {
100100
* @private
101101
*/
102102
let addPageBrowseParamsListener = function () {
103-
let paginationItems = document.querySelectorAll('.powermail_list .pagination a');
103+
let paginationItems = document.querySelectorAll('.powermail_list ._pagination a');
104104
paginationItems.forEach(function(item) {
105105
item.addEventListener('click', function(event) {
106106
event.preventDefault();
@@ -116,7 +116,7 @@ function PowermailBackend($, Modal) {
116116
const form = document.querySelector('#powermail_module_search');
117117
const paginationHiddenField = document.createElement('input');
118118
paginationHiddenField.setAttribute('type', 'hidden');
119-
paginationHiddenField.setAttribute('name', 'tx_powermail_web_powermailm1[currentPage]');
119+
paginationHiddenField.setAttribute('name', 'currentPage');
120120
paginationHiddenField.setAttribute('value', page.toString());
121121
form.appendChild(paginationHiddenField);
122122
form.submit();

Resources/Public/JavaScript/Powermail/Backend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)