mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-170] Fixed "add collection" behavior
This commit is contained in:
@@ -22,6 +22,8 @@ import { MetadataValue } from '../../core/shared/metadata.models';
|
||||
import { getFirstSucceededRemoteListPayload } from '../../core/shared/operators';
|
||||
import { collectionFormEntityTypeSelectionConfig, collectionFormModels, } from './collection-form.models';
|
||||
import { NONE_ENTITY_TYPE } from '../../core/shared/item-relationships/item-type.resource-type';
|
||||
import { hasNoValue, isNotNull } from 'src/app/shared/empty.util';
|
||||
|
||||
|
||||
/**
|
||||
* Form used for creating and editing collections
|
||||
@@ -66,6 +68,12 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> imp
|
||||
super(formService, translate, notificationsService, authService, requestService, objectCache);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (hasNoValue(this.formModel) && isNotNull(this.dso)) {
|
||||
this.initializeForm();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect changes to the dso and initialize the form,
|
||||
* if the dso changes, exists and it is not the first change
|
||||
|
Reference in New Issue
Block a user