From 052d0ab6ddcb3026f3aac64b3cb543b74cb33bd2 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Wed, 20 Dec 2023 12:06:09 +0200 Subject: [PATCH] feat: add only numbers for port --- src/pages/PairDevice/ConnectViaIP/AddressAndPortInputs.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/PairDevice/ConnectViaIP/AddressAndPortInputs.tsx b/src/pages/PairDevice/ConnectViaIP/AddressAndPortInputs.tsx index 824b4d2e..3b3f8329 100644 --- a/src/pages/PairDevice/ConnectViaIP/AddressAndPortInputs.tsx +++ b/src/pages/PairDevice/ConnectViaIP/AddressAndPortInputs.tsx @@ -23,6 +23,10 @@ const AddressAndPortInputs = ({ addressType, portType, isAdvanced }: AddressAndP } const onPortChangeHandler = (value: string) => { + if (isNaN(Number(value))) { + return + } + setPort(value) }