From 371a901b5987b18a05e44b9997aa515e71f4132b Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 5 Mar 2018 19:07:19 -0800 Subject: [PATCH] Allow columns to have an initial reversed sort Fixes #9. --- src/Table.elm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Table.elm b/src/Table.elm index cf8153c..a208a49 100644 --- a/src/Table.elm +++ b/src/Table.elm @@ -1,7 +1,7 @@ module Table exposing ( view , config, stringColumn, intColumn, floatColumn - , State, initialSort + , State, initialSort, initialReversedSort , Column, customColumn, veryCustomColumn , Sorter, unsortable, increasingBy, decreasingBy , increasingOrDecreasingBy, decreasingOrIncreasingBy @@ -84,6 +84,13 @@ initialSort header = State header False +{-| Same as initialSort, but reverse the order. +-} +initialReversedSort : String -> State +initialReversedSort header = + State header True + + -- CONFIG