[Update] Config Page: Device Tab. Threshold section. Add validation that when input area to be blank, put 0 automatically.

This commit is contained in:
Sakamoto Shiina
2024-09-10 20:08:32 +09:00
parent f0cadb1335
commit be7e77787e

View File

@@ -15,7 +15,11 @@ export const ThresholdEntry = (props) => {
const ThresholdEntry_Mic = (props) => {
const onChangeFunction = (e) => {
props.setThresholdFunction(e.currentTarget.value);
if (e.currentTarget.value === "") {
props.setThresholdFunction("0");
} else {
props.setThresholdFunction(e.currentTarget.value);
}
};
return (
@@ -29,7 +33,11 @@ const ThresholdEntry_Mic = (props) => {
const ThresholdEntry_Speaker = (props) => {
const onChangeFunction = (e) => {
props.setThresholdFunction(e.currentTarget.value);
if (e.currentTarget.value === "") {
props.setThresholdFunction("0");
} else {
props.setThresholdFunction(e.currentTarget.value);
}
};
return (