[CST-3782] possibility to configure the isDraggable feature to DynamicRowArrayModel

This commit is contained in:
Alessandro Martelli
2021-03-31 11:56:37 +02:00
parent d224333a1c
commit d47660b5c2
6 changed files with 22 additions and 3 deletions

View File

@@ -50,6 +50,11 @@ export abstract class FieldParser {
if (Array.isArray(this.configData.selectableMetadata) && this.configData.selectableMetadata.length === 1) {
metadataKey = this.configData.selectableMetadata[0].metadata;
}
let isDraggable = true;
if (this.configData.input.type === ParserType.Onebox && this.configData?.selectableMetadata?.length > 1) {
isDraggable = false;
}
const config = {
id: uniqueId() + '_array',
label: this.configData.label,
@@ -61,6 +66,7 @@ export abstract class FieldParser {
metadataKey,
metadataFields: this.getAllFieldIds(),
hasSelectableMetadata: isNotEmpty(this.configData.selectableMetadata),
isDraggable,
groupFactory: () => {
let model;
if ((arrayCounter === 0)) {