disable serial port button if already open
This commit is contained in:
@@ -51,6 +51,7 @@ export const Serial = (): JSX.Element => {
|
|||||||
{serialPorts.map((port, index) => (
|
{serialPorts.map((port, index) => (
|
||||||
<Button
|
<Button
|
||||||
key={index}
|
key={index}
|
||||||
|
disabled={!port.readable}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
void onConnect(port);
|
void onConnect(port);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user