@memberjunction/ng-user-view-grid 0.9.85 → 0.9.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,6 +71,7 @@ export declare class UserViewGridComponent implements OnInit, AfterViewInit {
71
71
  EditingComplete(): Promise<boolean>;
72
72
  IsDynamicView(): boolean;
73
73
  pageChange(event: PageChangeEvent): void;
74
+ private getGlobalRowNumberFromGridRowNumber;
74
75
  private virtualLoadData;
75
76
  constructor(formBuilder: FormBuilder, router: Router);
76
77
  private _saveTimeout;
@@ -274,6 +274,12 @@ export class UserViewGridComponent {
274
274
  this.skip = event.skip;
275
275
  this.virtualLoadData();
276
276
  }
277
+ getGlobalRowNumberFromGridRowNumber(gridRow) {
278
+ // we need to convert the grid row number to the global row number
279
+ // the grid row number is the row number within the current page of data
280
+ // the global row number is the row number within the entire set of data
281
+ return this.skip + gridRow;
282
+ }
277
283
  virtualLoadData() {
278
284
  // check to see if we have already formatted the slice of the data we need right now
279
285
  // we are storing the formattted data in the formattedData array and it has same set
@@ -515,10 +521,11 @@ export class UserViewGridComponent {
515
521
  if (this.compareMode || this.mergeMode)
516
522
  return;
517
523
  if (this._entityInfo) {
524
+ const globalRowNum = this.getGlobalRowNumberFromGridRowNumber(args.rowIndex);
518
525
  this.rowClicked.emit({
519
526
  entityId: this._entityInfo.ID,
520
527
  entityName: this._entityInfo.Name,
521
- primaryKeyValue: args.dataItem[this._entityInfo.PrimaryKey.Name]
528
+ primaryKeyValue: this.viewData[globalRowNum][this._entityInfo.PrimaryKey.Name]
522
529
  });
523
530
  if (this._entityInfo.AllowUpdateAPI &&
524
531
  this.EditMode !== "None") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-user-view-grid",
3
- "version": "0.9.85",
3
+ "version": "0.9.86",
4
4
  "description": "MemberJunction: Angular Grid to display dynamic and saved user views for any entity in MemberJunction.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",