Skip to content

Commit 820ed23

Browse files
authored
Merge pull request #2781 from StoDevX/cs-browse-on-clear
Course Search: Enter browsing mode on empty search bar
2 parents 1298a56 + dc7ca8d commit 820ed23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/views/sis/course-search/search.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ class CourseSearchView extends React.Component<Props, State> {
131131

132132
handleSearchChange = (value: string) => {
133133
this.setState(() => ({typedQuery: value}))
134+
if (value === '') {
135+
this.setState(() => ({mode: 'browsing', searchQuery: value}))
136+
}
134137
}
135138

136139
handleSearchFocus = () => {

0 commit comments

Comments
 (0)