Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix(association-select): Properly load initial data
- Loading branch information
Showing
with
9 additions
and
1 deletion.
-
+9
−1
src/component/association-select.js
|
@@ -146,7 +146,8 @@ export class AssociationSelect { |
|
|
return; |
|
|
} |
|
|
|
|
|
this.ownMeta = OrmMetadata.forTarget(this.entityManager.resolveEntityReference(this.repository.getResource())); |
|
|
let initialValue = this.value; |
|
|
this.ownMeta = OrmMetadata.forTarget(this.entityManager.resolveEntityReference(this.repository.getResource())); |
|
|
|
|
|
if (this.manyAssociation) { |
|
|
this.observe(this.manyAssociation); |
|
@@ -155,6 +156,13 @@ export class AssociationSelect { |
|
|
if (this.association) { |
|
|
this.observe(this.association); |
|
|
} |
|
|
|
|
|
if (initialValue) { |
|
|
this.load() |
|
|
.then(() => { |
|
|
this.value = initialValue; |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
|