From acce67d5625ab437f841fe553efc77b677226a98 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 14 Apr 2018 20:18:24 +0200 Subject: [PATCH] Fix sortable column attributes --- src/Handler/Utils/Table/Pagination.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index 7ddc207eb..8969d1a7d 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -161,9 +161,9 @@ dbTable PSValidator{..} DBTable{ dbtIdent = (toPathPiece -> dbtIdent), .. } = do } where directions = [dir | (k, dir) <- psSorting, Just k == sortableKey ] - sortableAttr = foldMap toAttr directions <> Html5.class_ "sortable" - toAttr SortAsc = Html5.class_ "sorted-asc" - toAttr SortDesc = Html5.class_ "sorted-desc" + sortableAttr = Html5.class_ . fromString . unwords $ "sortable" : foldMap toAttr directions + toAttr SortAsc = ["sorted-asc"] + toAttr SortDesc = ["sorted-desc"] $(widgetFile "table/layout") where tblLayout :: Widget -> Handler Html