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

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,7 +71,6 @@ 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;
75
74
  private virtualLoadData;
76
75
  constructor(formBuilder: FormBuilder, router: Router);
77
76
  private _saveTimeout;
@@ -274,12 +274,6 @@ 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
- }
283
277
  virtualLoadData() {
284
278
  // check to see if we have already formatted the slice of the data we need right now
285
279
  // we are storing the formattted data in the formattedData array and it has same set
@@ -521,11 +515,11 @@ export class UserViewGridComponent {
521
515
  if (this.compareMode || this.mergeMode)
522
516
  return;
523
517
  if (this._entityInfo) {
524
- const globalRowNum = this.getGlobalRowNumberFromGridRowNumber(args.rowIndex);
518
+ const pkeyVal = this.viewData[args.rowIndex][this._entityInfo.PrimaryKey.Name];
525
519
  this.rowClicked.emit({
526
520
  entityId: this._entityInfo.ID,
527
521
  entityName: this._entityInfo.Name,
528
- primaryKeyValue: this.viewData[globalRowNum][this._entityInfo.PrimaryKey.Name]
522
+ primaryKeyValue: pkeyVal
529
523
  });
530
524
  if (this._entityInfo.AllowUpdateAPI &&
531
525
  this.EditMode !== "None") {
@@ -537,7 +531,7 @@ export class UserViewGridComponent {
537
531
  }
538
532
  if (!this.InEditMode && this.AutoNavigate) {
539
533
  // tell app router to go to this record
540
- this.router.navigate(['resource', 'record', args.dataItem[this._entityInfo.PrimaryKey.Name]], { queryParams: { Entity: this._entityInfo.Name } });
534
+ this.router.navigate(['resource', 'record', pkeyVal], { queryParams: { Entity: this._entityInfo.Name } });
541
535
  }
542
536
  }
543
537
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-user-view-grid",
3
- "version": "0.9.86",
3
+ "version": "0.9.88",
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",