gribouille / elm-table-tailwind / Table.Config

Configuration of the table.


type alias Config a b msg =
Internal.Config.Config a b msg

Table's configuration (opaque).

Constructors

static : (Internal.Data.Model a -> msg) -> (a -> String) -> List (Table.Column.Column a msg) -> Config a () msg

Define a configuration for a table with static data (i.e. with all loaded data at once).

dynamic : (Internal.Data.Model a -> msg) -> (Internal.Data.Model a -> msg) -> (a -> String) -> List (Table.Column.Column a msg) -> Config a () msg

Define a configuration for a table with dynamic data (i.e. with paginated loaded data).

Customizations

withExpand : Table.Column.Column a msg -> Config a b msg -> Config a b msg

Add an full-width expandable row.

withSelection : Table.Types.Selection -> Config a b msg -> Config a b msg

Enable the selection (see Selection type for the different logics).

withSelectionFree : Config a b msg -> Config a b msg

Enable the selection with the free logic (see Selection for more details).

withSelectionLinked : Config a b msg -> Config a b msg

Enable the selection with the linked logic (see Selection for more details).

withSelectionLinkedStrict : Config a b msg -> Config a b msg

Enable the selection with the linked logic (see Selection for more details).

withSelectionExclusive : Config a b msg -> Config a b msg

Enable the selection with the exclusive logic (see Selection for more details).

withSelectionExclusiveStrict : Config a b msg -> Config a b msg

Enable the selection with the strict excluive logic (see Selection for more details).

withPagination : List Basics.Int -> Basics.Int -> Config a b msg -> Config a b msg

Enable the pagination and define the page sizes and the detault page size.

withProgressive : Basics.Int -> Basics.Int -> Config a b msg -> Config a b msg

Enable the progressive loading pagination.

withToolbar : List (Html msg) -> Config a b msg -> Config a b msg

Add a custom toolbar.

withErrorView : (String -> Html msg) -> Config a b msg -> Config a b msg

Define a specific error message.

withSubtable : (a -> List b) -> (b -> String) -> List (Table.Column.Column b msg) -> Maybe (Table.Column.Column b msg) -> Config a () msg -> Config a b msg

Define a subtable.