@trudb/tru-common-lib 0.2.361 → 0.2.363
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.
|
@@ -7755,9 +7755,8 @@ class TruDataGrid {
|
|
|
7755
7755
|
if (!childToAssociate)
|
|
7756
7756
|
childToAssociate = this.appEnvironment.globalDataContext?.entityAccess().searchByRefCacheOnly(unassociatedType, ref, true);
|
|
7757
7757
|
if (childToAssociate) {
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
enhancedEntity.$entity[this.config.parentTableRelationshipRefName] = this.entity[this.config.parentTableRefName];
|
|
7758
|
+
newEntity.$entity[this.config.resultConfig.entityManyToManyTypeNameWithPrefix + 'Ref'] = childToAssociate[unassociatedType.name + 'Ref'];
|
|
7759
|
+
newEntity.$entity[this.config.parentTableRelationshipRefName] = this.entity[this.config.parentTableRefName];
|
|
7761
7760
|
// remove item from the add dropdown control
|
|
7762
7761
|
let itemIndex = this.unassociatedChoices.findIndex((choice) => {
|
|
7763
7762
|
return choice.value.$ === childToAssociate[unassociatedType.name + 'Ref'];
|
|
@@ -7766,7 +7765,7 @@ class TruDataGrid {
|
|
|
7766
7765
|
// clear add selection
|
|
7767
7766
|
this.selectedUnassociatedChoice = undefined;
|
|
7768
7767
|
// add row to grid
|
|
7769
|
-
this.unsavedEntities.push(
|
|
7768
|
+
this.unsavedEntities.push(newEntity);
|
|
7770
7769
|
this.rowData.push(newEntity);
|
|
7771
7770
|
this.api.applyTransaction({ add: [newEntity], addIndex: 0 });
|
|
7772
7771
|
this.api.refreshCells({ force: true });
|