mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[#1892] Apply type-bind to concat fields that are not dynamic arrays
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
import { DynamicFormControlLayout, DynamicFormGroupModel, DynamicFormGroupModelConfig, serializable } from '@ng-dynamic-forms/core';
|
import {
|
||||||
|
DynamicFormControlLayout,
|
||||||
|
DynamicFormControlRelation,
|
||||||
|
DynamicFormGroupModel,
|
||||||
|
DynamicFormGroupModelConfig,
|
||||||
|
serializable
|
||||||
|
} from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
@@ -16,6 +22,7 @@ export interface DynamicConcatModelConfig extends DynamicFormGroupModelConfig {
|
|||||||
separator: string;
|
separator: string;
|
||||||
value?: any;
|
value?: any;
|
||||||
hint?: string;
|
hint?: string;
|
||||||
|
typeBindRelations?: DynamicFormControlRelation[];
|
||||||
relationship?: RelationshipOptions;
|
relationship?: RelationshipOptions;
|
||||||
repeatable: boolean;
|
repeatable: boolean;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
@@ -29,6 +36,8 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
|||||||
|
|
||||||
@serializable() separator: string;
|
@serializable() separator: string;
|
||||||
@serializable() hasLanguages = false;
|
@serializable() hasLanguages = false;
|
||||||
|
@serializable() typeBindRelations: DynamicFormControlRelation[];
|
||||||
|
@serializable() typeBindHidden = false;
|
||||||
@serializable() relationship?: RelationshipOptions;
|
@serializable() relationship?: RelationshipOptions;
|
||||||
@serializable() repeatable?: boolean;
|
@serializable() repeatable?: boolean;
|
||||||
@serializable() required?: boolean;
|
@serializable() required?: boolean;
|
||||||
@@ -55,6 +64,7 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
|
|||||||
this.metadataValue = config.metadataValue;
|
this.metadataValue = config.metadataValue;
|
||||||
this.valueUpdates = new Subject<string>();
|
this.valueUpdates = new Subject<string>();
|
||||||
this.valueUpdates.subscribe((value: string) => this.value = value);
|
this.valueUpdates.subscribe((value: string) => this.value = value);
|
||||||
|
this.typeBindRelations = config.typeBindRelations ? config.typeBindRelations : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
get value() {
|
get value() {
|
||||||
|
Reference in New Issue
Block a user