Skip to content

Commit

Permalink
set the current page
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Sep 22, 2023
1 parent f6372ee commit f104ec3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Tags/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace TransformStudios\Events\Tags;

use Carbon\CarbonInterface;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Statamic\Contracts\Query\Builder;
Expand Down Expand Up @@ -136,7 +137,10 @@ private function generator(): Generator
callback: fn (Generator $generator, array $terms) => $generator->terms(terms: $terms)
)->when(
value: $this->params->int('paginate'),
callback: fn (Generator $generator, int $perPage) => $generator->pagination(perPage: $perPage)
callback: fn (Generator $generator, int $perPage) => $generator->pagination(
page: Paginator::resolveCurrentPage(),
perPage: $perPage
)
)->when(
value: $this->params->bool('collapse_multi_days'),
callback: fn (Generator $generator) => $generator->collapseMultiDays()
Expand Down

0 comments on commit f104ec3

Please sign in to comment.