Skip to content
Snippets Groups Projects
Commit 0d774f40 authored by Scott Berg's avatar Scott Berg
Browse files

Update search to only close after add on mobile

parent 95b6d41d
No related branches found
No related tags found
No related merge requests found
Pipeline #36816 passed
<mat-sidenav-container hasBackdrop="false">
<mat-sidenav-container [hasBackdrop]="mobileView.matches">
<mat-sidenav
#addMenu
position="end"
......
......@@ -181,7 +181,9 @@ export class CourseItemComponent implements OnInit {
case 'search': {
this.addToTerm(toTermCode);
this.store.dispatch(new CloseCourseSearch());
if (this.mobileView.matches) {
this.store.dispatch(new CloseCourseSearch());
}
break;
}
}
......@@ -213,7 +215,7 @@ export class CourseItemComponent implements OnInit {
);
// If course is in a term, we need to remove it
// If this course came from search, close the search
// If this course came from search and is mobile, close the search
switch (this.type) {
case 'course':
this.store.dispatch(
......@@ -225,7 +227,9 @@ export class CourseItemComponent implements OnInit {
break;
case 'search':
this.store.dispatch(new CloseCourseSearch());
if (this.mobileView.matches) {
this.store.dispatch(new CloseCourseSearch());
}
break;
}
}
......
......@@ -259,7 +259,9 @@ export class TermContainerComponent implements OnInit, OnDestroy {
}),
);
this.store.dispatch(new CloseCourseSearch());
if (this.mobileView.matches) {
this.store.dispatch(new CloseCourseSearch());
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment