2023-05-16 16:10:24 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"git.d3nexus.de/Dadido3/D3vugu-components/components/navigation"
|
|
|
|
"github.com/vugu/vugu"
|
|
|
|
)
|
|
|
|
|
|
|
|
type PageLayout struct {
|
2023-05-29 12:23:37 +00:00
|
|
|
Pagination navigation.PaginationInfo `vugu:"data"`
|
2023-05-16 16:10:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PageLayout) Init(ctx vugu.InitCtx) {
|
2023-05-29 12:32:25 +00:00
|
|
|
c.Pagination.Page = 2
|
|
|
|
c.Pagination.Pages = 10
|
2023-05-16 16:10:24 +00:00
|
|
|
}
|
|
|
|
|
2023-06-01 17:22:19 +00:00
|
|
|
func (c *PageLayout) handlePaginate(event navigation.PaginateEvent) {
|
2023-05-29 12:23:37 +00:00
|
|
|
log.Printf("Current pagination info: %v", event.PaginationInfo)
|
2023-05-16 16:10:24 +00:00
|
|
|
}
|