email notification port, last digit staying error fix

This commit is contained in:
Ensar Kurt 2025-03-17 23:48:17 +03:00
parent fe57333f84
commit 7cb184dc97

View File

@ -663,13 +663,16 @@ export const HandleNotifications = ({ notificationId }: Props) => {
{...field}
onChange={(e) => {
const value = e.target.value;
if (value) {
if (value === "") {
field.onChange(undefined);
} else {
const port = Number.parseInt(value);
if (port > 0 && port < 65536) {
field.onChange(port);
}
}
}}
value={field.value || ""}
type="number"
/>
</FormControl>