mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX Paginating a gridfield causing a change event
This commit is contained in:
parent
48c6dec47d
commit
9f5b0086cb
@ -245,7 +245,7 @@ class GridFieldPaginator implements GridField_HTMLProvider, GridField_DataManipu
|
||||
} else {
|
||||
// First page button
|
||||
$firstPage = new GridField_FormAction($gridField, 'pagination_first', 'First', 'paginate', 1);
|
||||
$firstPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-double-left ss-gridfield-firstpage');
|
||||
$firstPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-double-left ss-gridfield-pagination-action ss-gridfield-firstpage');
|
||||
if ($state->currentPage == 1) {
|
||||
$firstPage = $firstPage->performDisabledTransformation();
|
||||
}
|
||||
@ -259,7 +259,7 @@ class GridFieldPaginator implements GridField_HTMLProvider, GridField_DataManipu
|
||||
'paginate',
|
||||
$previousPageNum
|
||||
);
|
||||
$previousPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-left ss-gridfield-previouspage');
|
||||
$previousPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-left ss-gridfield-pagination-action ss-gridfield-previouspage');
|
||||
if ($state->currentPage == 1) {
|
||||
$previousPage = $previousPage->performDisabledTransformation();
|
||||
}
|
||||
@ -273,14 +273,14 @@ class GridFieldPaginator implements GridField_HTMLProvider, GridField_DataManipu
|
||||
'paginate',
|
||||
$nextPageNum
|
||||
);
|
||||
$nextPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-right ss-gridfield-nextpage');
|
||||
$nextPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-right ss-gridfield-pagination-action ss-gridfield-nextpage');
|
||||
if ($state->currentPage == $totalPages) {
|
||||
$nextPage = $nextPage->performDisabledTransformation();
|
||||
}
|
||||
|
||||
// Last page button
|
||||
$lastPage = new GridField_FormAction($gridField, 'pagination_last', 'Last', 'paginate', $totalPages);
|
||||
$lastPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-double-right ss-gridfield-lastpage');
|
||||
$lastPage->addExtraClass('btn btn-secondary btn--hide-text btn-sm font-icon-angle-double-right ss-gridfield-pagination-action ss-gridfield-lastpage');
|
||||
if ($state->currentPage == $totalPages) {
|
||||
$lastPage = $lastPage->performDisabledTransformation();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user