Skip to content

Commit d597ec2

Browse files
committed
Redirect massactions simply to current page
1 parent 49944ca commit d597ec2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Component/Grid/GridViewModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public function getNamespace(): string
6363
return $this->getBlock()->getNameInLayout();
6464
}
6565

66+
public function getCurrentUrl(): string
67+
{
68+
return (string)$this->urlFactory->create()->getUrl('*/*/*');
69+
}
70+
6671
public function getSearchableFields(): array
6772
{
6873
$searchableFields = (array)$this->getBlock()->getSearchableFields();

view/adminhtml/templates/grid/massactions.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (empty($massActions)) {
3939
<form method="post" x-ref="massActionForm">
4040
<input type="hidden" name="selected[]" x-ref="massActionFormIds" />
4141
<input type="hidden" name="namespace" value="<?= $escaper->escapeHtml($viewModel->getNamespace()) ?>" />
42-
<input type="hidden" name="loki_redirect_url" value="<?= /* @noEscape */ $viewModel->getIndexUrl() ?>" />
42+
<input type="hidden" name="loki_redirect_url" value="<?= /* @noEscape */ $viewModel->getCurrentUrl() ?>" />
4343
<?= /* @noEscape */ $block->getBlockHtml('formkey') ?>
4444
</form>
4545
</div>

0 commit comments

Comments
 (0)