diff --git a/apps/dokploy/components/ui/input.tsx b/apps/dokploy/components/ui/input.tsx index 7339d21a2..18b713af5 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, - ); - } - }} /> ); },