Skip to content

Commit 8904567

Browse files
committed
save recent filter combo on unmount
1 parent c3d99c6 commit 8904567

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)