Showing now 'Alle' instead of an empty text

This commit is contained in:
dankito 2024-09-08 20:53:30 +02:00
parent 61ce30c634
commit 1d30d619ff
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ fun FilterBar() {
items = years, items = years,
selectedItem = transactionsFilter.value.year, selectedItem = transactionsFilter.value.year,
onSelectedItemChanged = { year -> transactionsFilter.value.year = year }, onSelectedItemChanged = { year -> transactionsFilter.value.year = year },
getItemDisplayText = { year -> if (year == null) "" else year.toString() }, getItemDisplayText = { year -> if (year == null) "Alle" else year.toString() },
modifier = Modifier.width(125.dp).padding(horizontal = horizontalPadding) modifier = Modifier.width(125.dp).padding(horizontal = horizontalPadding)
) )
@ -76,7 +76,7 @@ fun FilterBar() {
items = months, items = months,
selectedItem = transactionsFilter.value.month?.let { months[it - 1] }, selectedItem = transactionsFilter.value.month?.let { months[it - 1] },
onSelectedItemChanged = { month -> transactionsFilter.value.month = (if (month == null) null else months.indexOf(month) + 1) }, onSelectedItemChanged = { month -> transactionsFilter.value.month = (if (month == null) null else months.indexOf(month) + 1) },
getItemDisplayText = { month -> if (month == null) "" else month }, getItemDisplayText = { month -> if (month == null) "Alle" else month },
modifier = Modifier.width(154.dp) modifier = Modifier.width(154.dp)
) )
} }