Skip to content

Commit aea9b90

Browse files
committed
Update paginator
1 parent 43cf4c0 commit aea9b90

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Paginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function render(): string {
132132
'first_on_page' => Helpers::formatNumber(array_key_first($this->paginated) + ($on_page > 0 ? 1 : 0)),
133133
'last_on_page' => Helpers::formatNumber(array_key_last($this->paginated) + ($on_page > 0 ? 1 : 0)),
134134
'total' => Helpers::formatNumber($this->total),
135-
'current' => $this->page,
135+
'current_page' => $this->page,
136136
'per_page' => $this->per_page,
137137
'select' => array_combine($select, $select),
138138
'url' => Http::queryString($this->url[0], $this->url[1]),

templates/components/paginator.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% if pages and pages|length > 1 %}
1515
<ul class="inline-flex">
1616
{% for page in pages %}
17-
{% if page == current %}
17+
{% if page == current_page %}
1818
{% set class = 'text-white bg-' ~ color ~ '-500 border-' ~ color ~ '-300 hover:bg-' ~ color ~ '-600' %}
1919
{% else %}
2020
{% set class = 'text-gray-500 bg-white border-gray-300 hover:bg-gray-100 hover:text-gray-700' %}

0 commit comments

Comments
 (0)