mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: convert final value
This commit is contained in:
@@ -39,6 +39,7 @@ const NumberInput = React.forwardRef<HTMLInputElement, InputProps>(
|
|||||||
className={cn("text-left", className)}
|
className={cn("text-left", className)}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
|
value={props.value === undefined ? undefined : String(props.value)}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
@@ -50,10 +51,12 @@ const NumberInput = React.forwardRef<HTMLInputElement, InputProps>(
|
|||||||
...e,
|
...e,
|
||||||
target: {
|
target: {
|
||||||
...e.target,
|
...e.target,
|
||||||
value: number.toString(),
|
value: number,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
props.onChange?.(syntheticEvent as React.ChangeEvent<HTMLInputElement>);
|
props.onChange?.(
|
||||||
|
syntheticEvent as unknown as React.ChangeEvent<HTMLInputElement>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user