Skip to content

Commit

Permalink
show hint if table data is filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Dec 22, 2023
1 parent 0235b1e commit d480411
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions lang/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,4 @@ Load graph from .gs file: Eine bestehende .gs Datei laden
try an example: Beispiele
open in new tab: In neuem Tab öffnen
show zero value transactions: Transaktionen ohne Wert anzeigen
no rows match your filter criteria: Keine Einträge vorhanden, die Ihren Filtereinstellungen entsprechen
19 changes: 14 additions & 5 deletions src/View/Graph/Table.elm
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ table vc attributes tools config tbl =
]

else if List.isEmpty tbl.data then
[ div
[ Css.Table.emptyHint vc |> css
]
[ Locale.string vc.locale "This table is empty" |> text
]
[ tableHint vc "This table is empty"
]

else if List.isEmpty tbl.filtered then
[ tableHint vc "No rows match your filter criteria"
]

else
Expand Down Expand Up @@ -430,3 +430,12 @@ info vc { data, filtered } =
"{0} items"
[ String.fromInt lf ]
]


tableHint : View.Config -> String -> Html msg
tableHint vc msg =
div
[ Css.Table.emptyHint vc |> css
]
[ Locale.string vc.locale msg |> text
]

0 comments on commit d480411

Please sign in to comment.