MackeyRMS / elm-ui-table / Table.Column

Flexible helpers for constructing Table.Columns

Primary Constructors


type alias Column ctx record msg =
{ title : String
, startingWidth : Maybe Element.WithContext.Length
, sort : Sorter record
, body : record -> Element.WithContext.Element ctx msg
, toStr : record -> String
, filter : Maybe (String -> String -> Basics.Bool)
, encode : record -> Json.Encode.Value
, tooltip : Maybe String 
}

date : String -> Maybe Element.WithContext.Length -> (record -> Time.Posix) -> Column { ctx | tz : Time.Zone } record msg

SIMPLE

dateTime : String -> Maybe Element.WithContext.Length -> (record -> Time.Posix) -> Column { ctx | tz : Time.Zone } record msg

SIMPLE

float : String -> Maybe Element.WithContext.Length -> (record -> Basics.Float) -> Column ctx record msg

SIMPLE

int : String -> Maybe Element.WithContext.Length -> (record -> Basics.Int) -> Column ctx record msg

SIMPLE

string : String -> Maybe Element.WithContext.Length -> (record -> String) -> Column ctx record msg

SIMPLE

ellipsis : String -> Maybe Element.WithContext.Length -> (record -> String) -> Column ctx record msg

custom : String -> Maybe Element.WithContext.Length -> (record -> Element.WithContext.Element ctx msg) -> Column ctx record msg

SIMPLE

Extended Constructors

date_ : String -> Maybe Element.WithContext.Length -> (record -> Time.Posix) -> (record -> Element.WithContext.Element { ctx | tz : Time.Zone } msg) -> Column { ctx | tz : Time.Zone } record msg

COMPLEX

dateTime_ : String -> Maybe Element.WithContext.Length -> (record -> Time.Posix) -> Column { ctx | tz : Time.Zone } record msg

COMPLEX

int_ : String -> Maybe Element.WithContext.Length -> (record -> Basics.Int) -> (record -> Element.WithContext.Element ctx msg) -> Column ctx record msg

COMPLEX

string_ : String -> Maybe Element.WithContext.Length -> (record -> String) -> (record -> Element.WithContext.Element ctx msg) -> (record -> Json.Encode.Value) -> Column ctx record msg

COMPLEX

custom_ : String -> Maybe Element.WithContext.Length -> (record -> Element.WithContext.Element ctx msg) -> (record -> Json.Encode.Value) -> Column ctx record msg

COMPLEX

Exposing Type Constructors


type Sorter record
    = Sorted String (List record -> List record)
    | Unsorted

Column Modifiers

keep : (String -> String -> Basics.Bool) -> Column ctx record msg -> Column ctx record msg

tooltip : String -> Column ctx record msg -> Column ctx record msg

withSort : (record -> comparable) -> Column ctx record msg -> Column ctx record msg