Skip to content

Commit bf8d4c4

Browse files
kevin-lannthomasyzy7Austin-Xminhhaitran08MasahisaSekita
authored
Hotfix/1.0.5 - develop (#142)
Co-authored-by: dawangk <[email protected]> Co-authored-by: Austin-X <[email protected]> Co-authored-by: minhhaitran08 <[email protected]> Co-authored-by: Masahisa Sekita <[email protected]> Co-authored-by: Dmitriy Prokopchuk <[email protected]> Co-authored-by: Austin-X <[email protected]> Co-authored-by: dawangk <[email protected]> Co-authored-by: kevin-lann <[email protected]> Co-authored-by: MasahisaSekita <[email protected]> Co-authored-by: dawangk <[email protected]>
1 parent 34a0672 commit bf8d4c4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

course-matrix/frontend/src/pages/TimetableBuilder/CreateCustomSetting.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,15 @@ const CreateCustomSetting = ({
166166
<FormLabel>Restriction Type</FormLabel>
167167
<FormControl>
168168
<Select
169-
onValueChange={field.onChange}
169+
onValueChange={(value) => {
170+
field.onChange(value);
171+
// Reset values when toggle type
172+
restrictionForm.setValue("days", []);
173+
restrictionForm.setValue("startTime", undefined);
174+
restrictionForm.setValue("endTime", undefined);
175+
restrictionForm.setValue("maxGap", undefined);
176+
restrictionForm.setValue("numDays", undefined);
177+
}}
170178
value={field.value}
171179
defaultValue={""}
172180
>

0 commit comments

Comments
 (0)