D3vugu-components/components/navigation/events.go

24 lines
625 B
Go
Raw Normal View History

package navigation
import "github.com/vugu/vugu"
type PaginationEvent struct {
vugu.DOMEvent
Page int
}
// PaginationHandler is the interface for things that can handle PaginationEvent.
type PaginationHandler interface {
PaginationHandle(event PaginationEvent)
}
// PaginationFunc implements PaginationHandler as a function.
type PaginationFunc func(event PaginationEvent)
// PaginationHandle implements the PaginationHandler interface.
func (f PaginationFunc) PaginationHandle(event PaginationEvent) { f(event) }
// assert PaginationFunc implements PaginationHandler.
var _ PaginationHandler = PaginationFunc(nil)