peterszerzo/elm-natural-ui/8.3.0

NOTE: this package is not compatible with Elm 0.19.1

NaturalUi.Table

Smart table

Types

type State

State

type alias SortState =
{ columnIndex : Int
, isAscending : Bool
}

Sort state

type alias Data msg =
{ headers : List String
, rows : List (Row msg)
}

Data

type alias Row msg =
{ cells : List ( String, Html msg )
, isEnabled : Bool
, actions :
List
{ icon : Html msg
, action : msg
, withDeletePrompt : Bool
}
, defaultAction : Maybe msg
}

Row

Methods

getConfig : List (Setting State (Data msg) msg) -> Config msg

Get configuration from a list of settings

init : State

Init

view : Config msg -> List (Html msg) -> Html msg

View