billstclair/elm-dynamodb/2.2.1

NOTE: the latest version is 2.5.0

DynamoDB.Html

Simple rendering for a list of DynamoDB.Types.Item.

renderItemTable : (Item -> msg) -> List String -> List Item -> Html msg

Render a table for a list of Items.

The list of strings is the key names which should appear first in the displayed table.

The wrapper, (Item -> msg), is called when the user clicks on a row.

type alias TableConfig element columnDescriptor =
{ columnDescriptors : List columnDescriptor
, columnDescriptorToString : columnDescriptor -> String
, elementToString : columnDescriptor -> element -> Maybe String
}

Describe a table column for renderTable.

(element -> msg)
-> TableConfig element columnDescriptor
-> List element
-> Html msg

Render a table. renderItemTable is implemented with this.

The wrapper, (element -> msg), is called when the user clicks on a row.