LP1904036 Patron search Clear Form clears visible results/summary
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / share / patron / search.component.ts
index d3b9da7..aee0148 100644 (file)
@@ -73,6 +73,9 @@ export class PatronSearchComponent implements OnInit, AfterViewInit {
     // any searches run as a result of @Input() startWithSearch.
     @Output() searchFired: EventEmitter<PatronSearch>;
 
+    // Fired when the search form is cleared via the Clear Form button.
+    @Output() formCleared: EventEmitter<void> = new EventEmitter<void>();
+
     search: any = {};
     searchOrg: IdlObject;
     expandForm: boolean;
@@ -159,6 +162,8 @@ export class PatronSearchComponent implements OnInit, AfterViewInit {
 
     clear() {
         this.search = {profile: null};
+        this.searchGrid.reload();
+        this.formCleared.emit();
     }
 
     getRows(pager: Pager, sort: any[]): Observable<any> {