Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- func DataTable[Row any](componentSettings DataTableSettings[Row]) templ.Component
- func DataTableDefaultEmptyState() templ.Component
- func DataTableDefaultSearchBox() templ.Component
- func FilterBar(componentSettings FilterBarSettings) templ.Component
- func Pagination(componentSettings PaginationSettings) templ.Component
- func Sidebar(componentSettings SidebarSettings) templ.Component
- type DataTableAlignment
- type DataTableColumnSettings
- type DataTableDensity
- type DataTableHeaderTextCase
- type DataTablePageSize
- type DataTableSettings
- type DataTableSortDirection
- type FilterBarSettings
- type FilterSettings
- type PaginationSettings
- type SidebarSettings
Constants ¶
View Source
const ( DataTableUrlPlaceholderPageNumber string = "{pageNumber}" DataTableUrlPlaceholderItemsPerPage string = "{itemsPerPage}" DataTableUrlPlaceholderSortKey string = "{sortKey}" DataTableUrlPlaceholderSortDirection string = "{sortDirection}" DataTableUrlPlaceholderSearch string = "{search}" )
View Source
const ( FilterKindTextContains string = "textContains" FilterKindEnumSelect string = "enumSelect" FilterKindNumberRange string = "numberRange" FilterKindDateRange string = "dateRange" )
View Source
const ( SidebarSideLeft string = "left" SidebarSideRight string = "right" SidebarAttachmentModeInline string = "inline" SidebarAttachmentModeFixed string = "fixed" )
Variables ¶
This section is empty.
Functions ¶
func FilterBar ¶
func FilterBar(componentSettings FilterBarSettings) templ.Component
func Pagination ¶
func Pagination(componentSettings PaginationSettings) templ.Component
func Sidebar ¶
func Sidebar(componentSettings SidebarSettings) templ.Component
Types ¶
type DataTableAlignment ¶
type DataTableAlignment string
const ( DataTableAlignmentLeft DataTableAlignment = "left" DataTableAlignmentCenter DataTableAlignment = "center" DataTableAlignmentRight DataTableAlignment = "right" )
type DataTableColumnSettings ¶
type DataTableDensity ¶
type DataTableDensity string
const ( DataTableDensityComfortable DataTableDensity = "comfortable" DataTableDensityDense DataTableDensity = "dense" )
type DataTableHeaderTextCase ¶
type DataTableHeaderTextCase string
const ( DataTableHeaderTextCaseLower DataTableHeaderTextCase = "lower" DataTableHeaderTextCaseUpper DataTableHeaderTextCase = "upper" )
type DataTablePageSize ¶
type DataTablePageSize uint
type DataTableSettings ¶
type DataTableSettings[Row any] struct { Columns []DataTableColumnSettings[Row] Rows []Row // OptionalFields BulkActions templ.Component CheckboxCheckedColor string CheckboxShape string CheckboxSize string CheckboxUncheckedColor string Density DataTableDensity EmptyState templ.Component Filters []FilterSettings HeaderActions templ.Component HeaderClass string HeaderTextCase DataTableHeaderTextCase Id string InitialFilterValues map[string]any InitialSearchQuery string InitialSortDirection DataTableSortDirection InitialSortKey string IsHeaderSticky bool IsStriped bool ItemsPerPage DataTablePageSize ItemsPerPageSizeChoices []DataTablePageSize ItemsTotal uint PageNumber uint PaginationAriaLabel string PagesTotal uint QueryUrlTemplate string RefreshDebounceMs uint RefreshOnEvents []string RowClassResolver func(row Row) string RowIdResolver func(row Row) string RowLabelResolver func(row Row) string SearchBox templ.Component SearchBoxAlignment DataTableAlignment }
type DataTableSortDirection ¶
type DataTableSortDirection string
const ( DataTableSortDirectionAsc DataTableSortDirection = "asc" DataTableSortDirectionDesc DataTableSortDirection = "desc" )
type FilterBarSettings ¶
type FilterBarSettings struct {
Filters []FilterSettings
ValuesTwoWayStatePath string
// OptionalFields
EnumSelectRadioGroupNamePrefix string
OnChangeFunc string
}
type FilterSettings ¶
type PaginationSettings ¶
type SidebarSettings ¶
type SidebarSettings struct {
MiddleContent templ.Component
// OptionalFields
HeaderContent templ.Component
Width string
BackgroundColor string
IsVisibleTwoWayStatePath string
IsCollapsed bool
IsCollapsedTwoWayStatePath string
AttachmentMode string
AttachmentModeTwoWayStatePath string
Side string
SideTwoWayStatePath string
IsOffCanvas bool
IsOffCanvasTwoWayStatePath string
}
Click to show internal directories.
Click to hide internal directories.