From 395c86666cbca10fe5e2f26476437e1e840b3a65 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Thu, 18 Jan 2024 09:07:47 -0500
Subject: Fix mobile keyboard on shares field (Fix #49)

---
 src/components/expense-form.tsx | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'src/components/expense-form.tsx')

diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx
index 46a004c..035d22c 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
+                                            }
                                           />
                                         </FormControl>
                                         {[
-- 
cgit v1.3

