Documentation ¶
Overview ¶
templ: version: v0.2.707
templ: version: v0.2.707
templ: version: v0.2.707
Index ¶
- type ColumnGroup
- type List
- type ListColumn
- func Column[T attrs.Definer](header func() string, getter any) ListColumn[T]
- func FieldColumn[T attrs.Definer](header func() string, fieldName string) ListColumn[T]
- func FuncColumn[T attrs.Definer](header func() string, data func(defs attrs.Definitions, row T) interface{}) ListColumn[T]
- func HTMLColumn[T attrs.Definer](header func() string, ...) ListColumn[T]
- func LinkColumn[T attrs.Definer](header func() string, fieldName string, ...) ListColumn[T]
- func TitleFieldColumn[T attrs.Definer](wraps ListColumn[T], getURL func(defs attrs.Definitions, row T) string) ListColumn[T]
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnGroup ¶
type ColumnGroup[T attrs.Definer] struct { Definitons attrs.Definitions Columns []ListColumn[T] Instance T }
func (*ColumnGroup[T]) AddColumn ¶
func (c *ColumnGroup[T]) AddColumn(column ListColumn[T])
func (*ColumnGroup[T]) Component ¶
func (c *ColumnGroup[T]) Component() templ.Component
func (*ColumnGroup[T]) Render ¶
func (c *ColumnGroup[T]) Render() string
type List ¶
type List[T attrs.Definer] struct { Columns []ListColumn[T] // contains filtered or unexported fields }
type ListColumn ¶
type ListColumn[T attrs.Definer] interface { Header() templ.Component Component(defs attrs.Definitions, row T) templ.Component }
func FieldColumn ¶
func FieldColumn[T attrs.Definer](header func() string, fieldName string) ListColumn[T]
func FuncColumn ¶
func FuncColumn[T attrs.Definer](header func() string, data func(defs attrs.Definitions, row T) interface{}) ListColumn[T]
func HTMLColumn ¶
func HTMLColumn[T attrs.Definer](header func() string, getHTML func(defs attrs.Definitions, row T) template.HTML) ListColumn[T]
func LinkColumn ¶
func LinkColumn[T attrs.Definer](header func() string, fieldName string, getURL func(defs attrs.Definitions, row T) string) ListColumn[T]
func TitleFieldColumn ¶
func TitleFieldColumn[T attrs.Definer](wraps ListColumn[T], getURL func(defs attrs.Definitions, row T) string) ListColumn[T]
type View ¶
type View[T attrs.Definer] struct { views.BaseView AmountParam string PageParam string MaxAmount uint64 DefaultAmount uint64 ListColumns []ListColumn[T] TitleFieldColumn func(ListColumn[T]) ListColumn[T] GetListFn func(amount, offset uint) ([]T, error) }
func (*View[T]) Columns ¶
func (v *View[T]) Columns() []ListColumn[T]
Click to show internal directories.
Click to hide internal directories.