Creates a customizable Table component by using predefined Html syntax.
Represents the table skin.
Represents the basic state of the component.
Represents an Header of the table. It's gonna be rendered as a
Represents a Row which contains a list of Columns.
Represents a Column which can manage a specific kind of data.
Represents the colSpan of a column. Alias for Integer.
Returns the config of the component.
...
type Msg =
SortBy String
...
myTableConfig : Table.Config
myTableConfig =
let
headers : List (Table.Header Msg)
headers =
List.map (\content -> Table.header (String.toLower content) content SortBy) [ "Country", "Capital city" ]
rows : List (Table.Row Msg)
rows =
List.map (Table.row << List.map Table.columnString ) [ ["Italy", "Rome"], ["France", "Paris"], ["U.K.", "London"] ]
alternateRows =
True
in
Table.config Table.defaultType headers rows alternateRows
...Creates an initial State with no sort applied.
Represents the Default table skin.
Represents the Alternative table skin.
Creates and Header.
myHeader : String -> String -> (String -> Msg) -> Table.Header Msg
myHeader slug content sortByTagger =
Table.header slug content sortByTaggerCreates a Row
myRow : List (Column Msg) -> Table.Row Msg
myRow columns =
Table.row columnsCreates a Column which content is Float primitive.
Creates a Column which content is Html.
Creates a Column which content is Integer primitive.
Creates a Column which content is String primitive.
Sorts the column defined by Slug in Desc order.
Unsets sorting for any column.
Represents the static configuration of the component.