Fixed back mapping unset Month (null)
This commit is contained in:
parent
8dd8852dc3
commit
c1140c1836
|
@ -13,6 +13,7 @@ import net.codinux.banking.ui.config.DI
|
|||
import net.codinux.banking.ui.config.Internationalization
|
||||
import net.codinux.banking.ui.forms.RoundedCornersCard
|
||||
import net.codinux.banking.ui.forms.Select
|
||||
import net.codinux.banking.ui.model.TransactionsGrouping
|
||||
|
||||
private val uiState = DI.uiState
|
||||
|
||||
|
@ -76,7 +77,7 @@ fun FilterBar() {
|
|||
label ="Monat",
|
||||
items = months,
|
||||
selectedItem = transactionsFilter.value.month?.let { months[it - 1] },
|
||||
onSelectedItemChanged = { month -> transactionsFilter.value.month = 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 },
|
||||
modifier = Modifier.width(selectBoxesWidth)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue