From 3cdf4c426c01842a9f034b17518ec55a6de61fe9 Mon Sep 17 00:00:00 2001 From: Ensar Kurt Date: Tue, 18 Mar 2025 00:05:59 +0300 Subject: [PATCH] revert commit from #1513 --- apps/dokploy/components/ui/input.tsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/apps/dokploy/components/ui/input.tsx b/apps/dokploy/components/ui/input.tsx index 7339d21a..18b713af 100644 --- a/apps/dokploy/components/ui/input.tsx +++ b/apps/dokploy/components/ui/input.tsx @@ -39,7 +39,7 @@ const NumberInput = React.forwardRef( className={cn("text-left", className)} ref={ref} {...props} - value={props.value === undefined || props.value === "" ? "" : String(props.value)} + value={props.value === undefined ? undefined : String(props.value)} onChange={(e) => { const value = e.target.value; if (value === "") { @@ -60,21 +60,6 @@ const NumberInput = React.forwardRef( } } }} - onBlur={(e) => { - // If input is empty, make 0 when focus is lost - if (e.target.value === "") { - const syntheticEvent = { - ...e, - target: { - ...e.target, - value: "0", - }, - }; - props.onChange?.( - syntheticEvent as unknown as React.ChangeEvent, - ); - } - }} /> ); },