From 4ac52ed4b9d5f39f48f93fa7ddbbfa9911e22070 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 12 Jul 2018 11:04:40 -0400 Subject: [PATCH] LP#1775466 Grid pageOffset option Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/grid/grid.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts index 06522f6c02..9135e7cb8c 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.component.ts @@ -63,6 +63,10 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy { // just to mark it hidden. @Input() hideFields: string; + // Allow the caller to jump directly to a specific page of + // grid data. + @Input() pageOffset: number; + context: GridContext; // These events are emitted from our grid-body component. @@ -100,6 +104,10 @@ export class GridComponent implements OnInit, AfterViewInit, OnDestroy { this.context.defaultHiddenFields = this.hideFields.split(','); } + if (this.pageOffset) { + this.context.pager.offset = this.pageOffset; + } + // TS doesn't seem to like: let foo = bar || () => ''; this.context.rowClassCallback = this.rowClassCallback || function () { return ''; }; -- 2.11.0