Skip to content

Commit 47e7eb1

Browse files
[DURACOM-170] Fixed "add collection" behavior
1 parent 499bfe3 commit 47e7eb1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/app/collection-page/collection-form/collection-form.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import { MetadataValue } from '../../core/shared/metadata.models';
2222
import { getFirstSucceededRemoteListPayload } from '../../core/shared/operators';
2323
import { collectionFormEntityTypeSelectionConfig, collectionFormModels, } from './collection-form.models';
2424
import { NONE_ENTITY_TYPE } from '../../core/shared/item-relationships/item-type.resource-type';
25+
import { hasNoValue, isNotNull } from 'src/app/shared/empty.util';
26+
2527

2628
/**
2729
* Form used for creating and editing collections
@@ -66,6 +68,12 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
6668
super(formService, translate, notificationsService, authService, requestService, objectCache);
6769
}
6870

71+
ngOnInit(): void {
72+
if (hasNoValue(this.formModel) && isNotNull(this.dso)) {
73+
this.initializeForm();
74+
}
75+
}
76+
6977
/**
7078
* Detect changes to the dso and initialize the form,
7179
* if the dso changes, exists and it is not the first change

0 commit comments

Comments
 (0)