mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
must have one button type selected
This commit is contained in:
@@ -164,6 +164,7 @@ const SchedulerDialog = ({
|
|||||||
exclusive
|
exclusive
|
||||||
disabled={!creating}
|
disabled={!creating}
|
||||||
onChange={(_event, flag: ScheduleFlag) => {
|
onChange={(_event, flag: ScheduleFlag) => {
|
||||||
|
if (flag !== null) {
|
||||||
setFieldErrors(undefined); // clear any validation errors
|
setFieldErrors(undefined); // clear any validation errors
|
||||||
setScheduleType(flag);
|
setScheduleType(flag);
|
||||||
// wipe the time field when changing the schedule type
|
// wipe the time field when changing the schedule type
|
||||||
@@ -179,6 +180,7 @@ const SchedulerDialog = ({
|
|||||||
? { ...editItem, flags: 0 }
|
? { ...editItem, flags: 0 }
|
||||||
: { ...editItem, flags: flag }
|
: { ...editItem, flags: flag }
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ToggleButton value={ScheduleFlag.SCHEDULE_DAY}>
|
<ToggleButton value={ScheduleFlag.SCHEDULE_DAY}>
|
||||||
|
|||||||
Reference in New Issue
Block a user