load collections after ngOninit has run (#8691)
This commit is contained in:
parent
d026087bfd
commit
a12c7242d6
|
@ -75,6 +75,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges,
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
|
await this.load();
|
||||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
||||||
this.ngZone.run(() => {
|
this.ngZone.run(() => {
|
||||||
switch (message.command) {
|
switch (message.command) {
|
||||||
|
|
|
@ -592,7 +592,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||||
this.writeableCollections.forEach((c) => ((c as any).checked = false));
|
this.writeableCollections.forEach((c) => ((c as any).checked = false));
|
||||||
}
|
}
|
||||||
if (this.cipher.organizationId != null) {
|
if (this.cipher.organizationId != null) {
|
||||||
this.collections = this.writeableCollections.filter(
|
this.collections = this.writeableCollections?.filter(
|
||||||
(c) => c.organizationId === this.cipher.organizationId,
|
(c) => c.organizationId === this.cipher.organizationId,
|
||||||
);
|
);
|
||||||
const org = await this.organizationService.get(this.cipher.organizationId);
|
const org = await this.organizationService.get(this.cipher.organizationId);
|
||||||
|
|
Loading…
Reference in New Issue