Fix sortable column attributes
This commit is contained in:
parent
9d65f94f51
commit
acce67d562
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user