From 0138e1aa2ad12c261e77d6deb0d820bbb24a7b1b Mon Sep 17 00:00:00 2001 From: andrzej Date: Tue, 2 Jul 2024 17:18:23 +0200 Subject: [PATCH] make fields open with space (to avoid conflicts) --- prisma/dev.db | Bin 69632 -> 69632 bytes src/app/ui/tables/inputs/numberInput.tsx | 13 +++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/prisma/dev.db b/prisma/dev.db index 06cb063331a50dabfac5e0998467aeb2267844b5..71e875b931699e464a94108d3b5bfff4f9463727 100644 GIT binary patch delta 120 zcmZozz|ydQWr8&0zlk!=jQ=(!EUV{Q%gUd_-@$*6Z|!D*hPiwyO0p~rOs)(ke2Wy^ zGxCc|6x{Puixo=p6@m*AlT#HO(-SlECSUAplby#P#$?TUCoEBdk%fW76rxxP$YwHS UdN;YGUyFtRJcIJ)Mg4IN0F$yN{Qv*} delta 86 zcmZozz|ydQWr8&0pNTTgjDI#JEUV|b$jYC?-@$*6f8J(+hPiwb7pP3W*w-d|o) { defaultValues: { [column]: props.cell.getValue() }, - // mode: "onChange" }) - const isDirty = form.formState.isDirty function onSubmit(value: z.infer) { toast({ @@ -67,20 +65,15 @@ export default function NumberInputCell(props: CellContext) { className="w-full h-fit flex items-center justify-center" tabIndex={0} onKeyDown={e => { - if (e.code === "Enter" && !isActive) { + if (e.code === "Space" && !isActive) { setIsActive(true) } }} > {isActive ?
- { - e.preventDefault() - if (isDirty) { - console.log("SUBMIT") - form.handleSubmit(onSubmit, onErrors) - } - }} > +