mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8952 from creative-commoners/pulls/4.4/hide-better-buttons-without-paginator
FIX Don't add "better buttons" previous and next without a paginator
This commit is contained in:
commit
6b8f0eae30
@ -286,8 +286,9 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
||||
|
||||
/** @var GridFieldDetailForm $component */
|
||||
$component = $this->gridField->getConfig()->getComponentByType(GridFieldDetailForm::class);
|
||||
$paginator = $this->getGridField()->getConfig()->getComponentByType(GridFieldPaginator::class);
|
||||
$gridState = $this->getRequest()->requestVar('gridState');
|
||||
if ($component && $component->getShowPagination()) {
|
||||
if ($component && $paginator && $component->getShowPagination()) {
|
||||
$previousAndNextGroup->push(FormAction::create('doPrevious')
|
||||
->setUseButtonTag(true)
|
||||
->setAttribute('data-grid-state', $gridState)
|
||||
|
Loading…
Reference in New Issue
Block a user