[Update] Config Page: Device Tab. Threshold section. Add validation that when input area to be blank, put 0 automatically.
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user