Skip to content

Commit

Permalink
Merge pull request #7 from DennisBauer/development
Browse files Browse the repository at this point in the history
Show format of price as 0.00 when editing an expense
  • Loading branch information
DennisBauer authored Sep 24, 2023
2 parents afcfe62 + 9719512 commit 922ee29
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import androidx.compose.ui.unit.dp
import de.dbauer.expensetracker.R
import de.dbauer.expensetracker.data.RecurringExpenseData
import de.dbauer.expensetracker.toFloatIgnoreSeparator
import de.dbauer.expensetracker.toValueString
import de.dbauer.expensetracker.ui.theme.ExpenseTrackerTheme

@OptIn(ExperimentalMaterial3Api::class)
Expand Down Expand Up @@ -103,7 +104,7 @@ private fun EditRecurringExpenseInternal(
mutableStateOf(TextFieldValue(currentData?.description ?: ""))
}
var priceState by rememberSaveable(stateSaver = TextFieldValue.Saver) {
mutableStateOf(TextFieldValue(currentData?.priceValue?.toString() ?: ""))
mutableStateOf(TextFieldValue(currentData?.priceValue?.toValueString() ?: ""))
}
val priceInputError =
rememberSaveable {
Expand Down

0 comments on commit 922ee29

Please sign in to comment.