datatable

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

templ: version: v0.3.833

templ: version: v0.3.833

templ: version: v0.3.833

templ: version: v0.3.833

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearSearchButton

func ClearSearchButton(dt Datatable) templ.Component

func LazyDataTable

func LazyDataTable(dt Datatable, classes string) templ.Component

func OrderableHeaderComponent

func OrderableHeaderComponent(dt Datatable, label string, name string) templ.Component

OrderableHeaderComponent is a component that renders a table header that can be clicked to sort the table

func PaginationCenterComponent

func PaginationCenterComponent(dt Datatable) templ.Component

func PaginationComponent

func PaginationComponent(dt Datatable) templ.Component

func PaginationLeftComponent

func PaginationLeftComponent(dt Datatable) templ.Component

func PaginationRightComponent

func PaginationRightComponent(dt Datatable) templ.Component

func ScopeComponent added in v0.1.3

func ScopeComponent(dt Datatable, scope string) templ.Component

func ScopeDudComponent added in v0.1.3

func ScopeDudComponent(dt Datatable, scope string) templ.Component

func ScopesComponent added in v0.1.3

func ScopesComponent(dt Datatable) templ.Component

func SearchComponent

func SearchComponent(dt Datatable) templ.Component

func TableFooterComponent

func TableFooterComponent(dt Datatable, nbrElements int, nbrCol int) templ.Component

Types

type Datatable

type Datatable struct {
	Pagination
	FilterParams
	// contains filtered or unexported fields
}

func NewDatatable

func NewDatatable(c echo.Context, baseUrl string, id string, itemPerPage int) (Datatable, error)

func (Datatable) ID

func (dt Datatable) ID() string

func (Datatable) Route

func (dt Datatable) Route() string

func (Datatable) Scope added in v0.1.3

func (dt Datatable) Scope() string

func (Datatable) Target

func (dt Datatable) Target() string

type FilterParams

type FilterParams struct {
	Page   int
	Sort   string
	Order  string
	Search string
	Scope  string
	Scopes []string
}

func (FilterParams) String

func (rp FilterParams) String(url string) string

type Pagination

type Pagination = struct {
	NbrPages    int
	Total       int
	ItemPerPage int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL