|
|
@ -13,7 +13,7 @@ import { map } from 'rxjs/operators'; |
|
|
import { ArrayItemComponent } from './array-item.component'; |
|
|
import { ArrayItemComponent } from './array-item.component'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'sqx-array-editor[form][formContext][formModel][language][languages]', |
|
|
selector: 'sqx-array-editor[form][formContext][formLevel][formModel][language][languages]', |
|
|
styleUrls: ['./array-editor.component.scss'], |
|
|
styleUrls: ['./array-editor.component.scss'], |
|
|
templateUrl: './array-editor.component.html', |
|
|
templateUrl: './array-editor.component.html', |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
changeDetection: ChangeDetectionStrategy.OnPush, |
|
|
@ -28,6 +28,9 @@ export class ArrayEditorComponent implements OnChanges { |
|
|
@Input() |
|
|
@Input() |
|
|
public formContext: any; |
|
|
public formContext: any; |
|
|
|
|
|
|
|
|
|
|
|
@Input() |
|
|
|
|
|
public formLevel: number; |
|
|
|
|
|
|
|
|
@Input() |
|
|
@Input() |
|
|
public formModel: FieldArrayForm; |
|
|
public formModel: FieldArrayForm; |
|
|
|
|
|
|
|
|
@ -81,7 +84,7 @@ export class ArrayEditorComponent implements OnChanges { |
|
|
return disabled || items.length >= maxItems; |
|
|
return disabled || items.length >= maxItems; |
|
|
})); |
|
|
})); |
|
|
|
|
|
|
|
|
this.isCollapsedInitial = this.localStore.getBoolean(this.expandedKey()); |
|
|
this.isCollapsedInitial = this.formLevel > 0 || this.localStore.getBoolean(this.expandedKey()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|