diff --git a/packages/form/src/widgets/array/array.widget.ts b/packages/form/src/widgets/array/array.widget.ts index 7802b06cb..fdc5860d0 100644 --- a/packages/form/src/widgets/array/array.widget.ts +++ b/packages/form/src/widgets/array/array.widget.ts @@ -46,7 +46,7 @@ import { ArrayLayoutWidget } from '../../widget';
- @for (i of $any(formProperty).properties; track $index) { + @if (i.visible && !i.ui.hidden) {
@@ -59,7 +59,7 @@ import { ArrayLayoutWidget } from '../../widget';
} - } +
@if (!ui.onlyVisual && showError) {
{{ error }}
@@ -115,16 +115,12 @@ export class ArrayWidget extends ArrayLayoutWidget implements OnInit { addItem(): void { const property = this.formProperty.add({}); this.reValid(); - if (this.ui.add) { - this.ui.add(property); - } + this.ui.add?.(property); } removeItem(index: number): void { this.formProperty.remove(index); this.reValid(); - if (this.ui.remove) { - this.ui.remove(index); - } + this.ui.remove?.(index); } }