Skip to content

Commit

Permalink
fix: disable if not used
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Feb 27, 2024
1 parent 0c9379a commit 6c2eea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/paginations/paginations.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func Prev(p PaginationProps) htmx.Node {
"join-item": true,
"btn": true,
"btn-outline": true,
"disabled": p.Offset == 0,
},
htmx.HxGet(fmt.Sprintf("%s?offset=%d&limit=%d", p.URL, p.Offset-p.Limit, p.Limit)),
htmx.HxSwap("innerHTML"),
Expand All @@ -51,7 +52,7 @@ func Next(p PaginationProps) htmx.Node {
"btn": true,
"btn-outline": true,
},
htmx.HxGet(fmt.Sprintf("%s?offset=%d&limit=%d", p.URL, p.Offset-p.Limit, p.Limit)),
htmx.HxGet(fmt.Sprintf("%s?offset=%d&limit=%d", p.URL, p.Offset+p.Limit, p.Limit)),
htmx.HxSwap("innerHTML"),
htmx.HxTarget("#data-table"),
htmx.Text("Next"),
Expand Down

0 comments on commit 6c2eea4

Please sign in to comment.