From: Bill Erickson Date: Thu, 12 Jul 2018 15:04:40 +0000 (-0400) Subject: LP#1775466 Grid pageOffset option X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ddfbc3bd8f17de9d99f38b7db6bee1de15482997;p=working%2FEvergreen.git LP#1775466 Grid pageOffset option Signed-off-by: Bill Erickson --- 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 ''; };