Documentation ¶
Index ¶
- Variables
- func Next(p PaginationProps) htmx.Node
- func Pagination(p PaginationProps, children ...htmx.Node) htmx.Node
- func PaginationPropsFromContext(c *fiber.Ctx) (limit int, offset int)
- func Prev(p PaginationProps) htmx.Node
- func Select(p SelectProps, children ...htmx.Node) htmx.Node
- func Table[S ~[]R, R Row](p TableProps, columns Columns[R], s S) htmx.Node
- func TablePagination(p TablePaginationProps, children ...htmx.Node) htmx.Node
- func TableToolbar(p TableToolbarProps, children ...htmx.Node) htmx.Node
- type ColumnDef
- type Columns
- type PaginationProps
- type Row
- type SelectProps
- type TablePaginationProps
- type TableProps
- type TableToolbarProps
Constants ¶
This section is empty.
Variables ¶
var DefaultLimits = []int{5, 10, 25, 50}
DefaultLimits is a list of default limits
Functions ¶
func Pagination ¶ added in v1.0.22
func Pagination(p PaginationProps, children ...htmx.Node) htmx.Node
Pagination ...
func PaginationPropsFromContext ¶ added in v1.0.32
PaginationFromContext returns a new Pagination object based on the provided context.
func Select ¶ added in v1.0.32
func Select(p SelectProps, children ...htmx.Node) htmx.Node
Select ...
func Table ¶
func Table[S ~[]R, R Row](p TableProps, columns Columns[R], s S) htmx.Node
Table is a struct that contains the properties of a table
func TablePagination ¶ added in v1.0.32
func TablePagination(p TablePaginationProps, children ...htmx.Node) htmx.Node
TablePagination is a component that renders a table pagination
func TableToolbar ¶ added in v1.0.32
func TableToolbar(p TableToolbarProps, children ...htmx.Node) htmx.Node
TableToolbar is a component that renders a table toolbar
Types ¶
type ColumnDef ¶
type ColumnDef[R Row] struct { ID string AccessorKey string Header func(p TableProps) htmx.Node Cell func(p TableProps, row R) htmx.Node EnableSorting bool EnableFiltering bool }
ColumnDef returns a new column definition.
type PaginationProps ¶ added in v1.0.32
type PaginationProps struct { ClassNames htmx.ClassNames Limit int Offset int Target string Total int URL string }
PaginationProps is a struct that contains the properties of a pagination
type Row ¶ added in v1.2.8
type Row interface { comparable }
Row is a struct that contains the properties of a row
type SelectProps ¶ added in v1.0.32
type SelectProps struct { ClassNames htmx.ClassNames Limit int Limits []int Offset int Target string Total int URL string }
SelectProps ...
type TablePaginationProps ¶ added in v1.0.32
type TablePaginationProps struct { ClassNames htmx.ClassNames Pagination htmx.Node }
TablePaginationProps is a struct that contains the properties of a table pagination
type TableProps ¶
type TableProps struct { ClassNames htmx.ClassNames ID string Pagination htmx.Node Toolbar htmx.Node }
TableProps is a struct that contains the properties of a table
type TableToolbarProps ¶ added in v1.0.32
type TableToolbarProps struct {
ClassNames htmx.ClassNames
}
TableToolbarProps is a struct that contains the properties of a table toolbar