@trudb/tru-common-lib 0.2.94 → 0.2.95

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.
@@ -2343,6 +2343,7 @@ class TruDesktopViewConfig {
2343
2343
  entities = undefined;
2344
2344
  entityIndex = 0;
2345
2345
  entityRefs = '';
2346
+ parentRefName = '';
2346
2347
  isDirty = false;
2347
2348
  isEditing = false;
2348
2349
  isInvalid = false;
@@ -3982,7 +3983,8 @@ class TruDetailViewBase {
3982
3983
  onAddEntity = (newEntity) => {
3983
3984
  if (!newEntity)
3984
3985
  newEntity = this.dataContext.entityAccess().add(this.entityType);
3985
- newEntity[this.tableName + 'Ref'] = this.entity[this.tableName + 'Ref'];
3986
+ if (this.view.parentRefName)
3987
+ newEntity[this.tableName + 'Ref'] = this.entity[this.view.parentRefName];
3986
3988
  this.entities.splice(this.navigationIndex + 1, 0, newEntity);
3987
3989
  this.navigateTo(this.navigationIndex + 1);
3988
3990
  };
@@ -7489,7 +7491,7 @@ class TruDataGrid {
7489
7491
  };
7490
7492
  onCellDoubleClicked = (gridConfig) => {
7491
7493
  if (gridConfig.colDef.cellClass === 'ag-pk-aligned-cell')
7492
- this.config.rowHeaderDoubleClicked(gridConfig);
7494
+ this.config.rowHeaderDoubleClicked(gridConfig, this.config.parentTableName);
7493
7495
  };
7494
7496
  onCellKeyDown = (params) => {
7495
7497
  if (!params.event)