Skip to content

Commit c26ef0b

Browse files
authored
feat(timetable): clear search bar when course is added to timetable (#3728)
* Clear search bar when a module is added to timetable * Remove stale comment
1 parent ae6e97d commit c26ef0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/src/views/timetable/ModulesSelect.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ const ModulesSelect: FC<Props> = ({
7777

7878
case Downshift.stateChangeTypes.keyDownEnter:
7979
case Downshift.stateChangeTypes.clickItem:
80-
// Don't reset isOpen, inputValue and highlightedIndex when item is selected
81-
return omit(changes, ['isOpen', 'inputValue', 'highlightedIndex']);
80+
setInputValue('');
81+
return changes;
8282

8383
case Downshift.stateChangeTypes.mouseUp:
8484
// TODO: Uncomment when we upgrade to Downshift v3

0 commit comments

Comments
 (0)