From 395c86666cbca10fe5e2f26476437e1e840b3a65 Mon Sep 17 00:00:00 2001 From: Sebastien Castiel Date: Thu, 18 Jan 2024 09:07:47 -0500 Subject: [PATCH] Fix mobile keyboard on shares field (Fix #49) --- src/components/expense-form.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx index 46a004c6..035d22cd 100644 --- a/src/components/expense-form.tsx +++ b/src/components/expense-form.tsx @@ -411,8 +411,18 @@ export function ExpenseForm({ ), ) } - inputMode="numeric" - step={1} + inputMode={ + form.getValues().splitMode === + 'BY_AMOUNT' + ? 'decimal' + : 'numeric' + } + step={ + form.getValues().splitMode === + 'BY_AMOUNT' + ? 0.01 + : 1 + } /> {[