Skip to content

Commit fc18779

Browse files
committed
feat: add OnFirstPage method for consistency
1 parent 6399027 commit fc18779

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paginator/paginator.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ func (m Model) OnLastPage() bool {
125125
return m.Page == m.TotalPages-1
126126
}
127127

128+
// OnFirstPage returns whether or not we're on the first page.
129+
func (m Model) OnFirstPage() bool {
130+
return m.Page == 0
131+
}
132+
128133
// New creates a new model with defaults.
129134
func New() Model {
130135
return Model{

0 commit comments

Comments
 (0)