From 2a407ec1549b60ed0eaedd386d3a256c5939f35a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 9 Jul 2020 17:44:39 -0400 Subject: [PATCH] submit search form immediately (LH#14) TODO: see if we can defer this if all we've done is gone directly to a specific provider Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/acq/provider/provider-results.component.html | 2 +- .../eg2/src/app/staff/acq/provider/provider-results.component.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html index 9691ddb8e4..a0b840873e 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html @@ -1,4 +1,4 @@ - +
    diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts index 413f62bb54..b981b7f59c 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit, Input, Output, EventEmitter, ViewChild} from '@angular/core'; +import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild} from '@angular/core'; import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; @@ -20,6 +20,7 @@ export class ProviderResultsComponent implements OnInit { gridSource: GridDataSource; @ViewChild('acqSearchProviderGrid', { static: true }) providerResultsGrid: GridComponent; + @ViewChild('providerSearchForm', { static: true }) providerSearchForm: AcqProviderSearchFormComponent; cellTextGenerator: GridCellTextGenerator; @Output() previewRow: (row: any) => void; @@ -46,6 +47,10 @@ export class ProviderResultsComponent implements OnInit { } } + ngAfterViewInit() { + setTimeout(x => this.providerSearchForm.submitSearch()); + } + doSearch(search: AcqProviderSearch) { setTimeout(() => { this.providerSearch.setSearch(search); -- 2.11.0