LP1818288 WS Option to pre-fetch record holds
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / share / grid / grid-toolbar-checkbox.component.ts
index 8765917..7ee3019 100644 (file)
@@ -12,6 +12,10 @@ export class GridToolbarCheckboxComponent implements OnInit {
     // Note most input fields should match class fields for GridColumn
     @Input() label: string;
 
+    // Set the render time value.
+    // This does NOT fire the onChange handler.
+    @Input() initialValue: boolean;
+
     // This is an input instead of an Output because the handler is
     // passed off to the grid context for maintenance -- events
     // are not fired directly from this component.
@@ -32,6 +36,7 @@ export class GridToolbarCheckboxComponent implements OnInit {
         const cb = new GridToolbarCheckbox();
         cb.label = this.label;
         cb.onChange = this.onChange;
+        cb.isChecked = this.initialValue;
 
         this.grid.context.toolbarCheckboxes.push(cb);
     }