Skip to content

Commit 0e89ed2

Browse files
authored
Merge pull request #2783 from StoDevX/save-filter-combos
Course Search: Save recent filter combinations on unmount
2 parents c3d99c6 + 8904567 commit 0e89ed2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ class CourseSearchView extends React.Component<Props, State> {
8383
this.resetFilters()
8484
}
8585

86+
componentWillUnmount() {
87+
if (this.state.mode === 'browsing') {
88+
this.props.updateRecentFilters(this.state.filters)
89+
}
90+
}
91+
8692
loadData = async () => {
8793
this.setState(() => ({mode: 'loading'}))
8894

0 commit comments

Comments
 (0)