@memberjunction/ng-user-view-grid 0.9.85 → 0.9.87
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,12 @@ 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);
|
|
525
|
+
const pkeyVal = this.viewData[globalRowNum][this._entityInfo.PrimaryKey.Name];
|
|
518
526
|
this.rowClicked.emit({
|
|
519
527
|
entityId: this._entityInfo.ID,
|
|
520
528
|
entityName: this._entityInfo.Name,
|
|
521
|
-
primaryKeyValue:
|
|
529
|
+
primaryKeyValue: pkeyVal
|
|
522
530
|
});
|
|
523
531
|
if (this._entityInfo.AllowUpdateAPI &&
|
|
524
532
|
this.EditMode !== "None") {
|
|
@@ -530,7 +538,7 @@ export class UserViewGridComponent {
|
|
|
530
538
|
}
|
|
531
539
|
if (!this.InEditMode && this.AutoNavigate) {
|
|
532
540
|
// tell app router to go to this record
|
|
533
|
-
this.router.navigate(['resource', 'record',
|
|
541
|
+
this.router.navigate(['resource', 'record', pkeyVal], { queryParams: { Entity: this._entityInfo.Name } });
|
|
534
542
|
}
|
|
535
543
|
}
|
|
536
544
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-user-view-grid",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.87",
|
|
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",
|