LP1952931 Disable try run by default; focus input on load
authorBill Erickson <berickxx@gmail.com>
Fri, 8 Apr 2022 15:08:34 +0000 (11:08 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 8 Apr 2022 15:32:14 +0000 (11:32 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts

index 0ebd84f..e97ca1c 100644 (file)
@@ -27,7 +27,7 @@ export class AsnReceiveComponent implements OnInit {
 
     barcode = '';
     receiving = false;
-    dryRun = true;
+    dryRun = false;
     receiveOnScan = false;
     notFound = false;
     findingContainer = false;
@@ -64,6 +64,8 @@ export class AsnReceiveComponent implements OnInit {
         this.gridDataSource.getRows = (pager: Pager, sort: any[]) => {
             return from(this.entries.map(e => this.gridifyEntry(e)));
         };
+
+        setTimeout(() => this.focusInput());
     }
 
     gridifyEntry(entry: IdlObject): any {
@@ -121,12 +123,16 @@ export class AsnReceiveComponent implements OnInit {
                     this.loadingContainer = false;
                 }
 
-                const node = document.getElementById('barcode-search-input');
-                (node as HTMLInputElement).select();
+                this.focusInput();
             }
         );
     }
 
+    focusInput() {
+        const node = document.getElementById('barcode-search-input');
+        (node as HTMLInputElement).select();
+    }
+
     loadContainer(): Promise<any> {
         if (!this.container) {
             this.loadingContainer = false;