From b40d76e4bf28bb7c0847eab71eba4983cdc6e716 Mon Sep 17 00:00:00 2001 From: setop Date: Wed, 29 Nov 2023 10:40:30 +0100 Subject: [PATCH] add initialRevSort --- .tool-versions | 1 + elm.json | 2 +- src/Table.elm | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..b825aa9 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +elm 0.19.1 diff --git a/elm.json b/elm.json index 131f11a..4805718 100644 --- a/elm.json +++ b/elm.json @@ -3,7 +3,7 @@ "name": "NoRedInk/elm-sortable-table", "summary": "Sortable tables for whatever data you want to display.", "license": "BSD-3-Clause", - "version": "1.0.0", + "version": "1.0.1", "exposed-modules": [ "Table" ], diff --git a/src/Table.elm b/src/Table.elm index 48a770a..a7f2c36 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, initialRevSort , Column, customColumn, veryCustomColumn , Sorter, unsortable, increasingBy, decreasingBy , increasingOrDecreasingBy, decreasingOrIncreasingBy @@ -88,6 +88,10 @@ initialSort : String -> State initialSort header = State header False +initialRevSort : String -> State +initialRevSort header = + State header True + -- CONFIG