remove object type from array-form

This commit is contained in:
Joel Wetzell
2026-02-13 20:30:17 -06:00
parent 0f35a69b4a
commit 0bad241845
2 changed files with 6 additions and 7 deletions
+3 -3
View File
@@ -1,19 +1,19 @@
@if (paramFormControl && paramInfo?.schema) {
@if (arrayValue) {
<div cdkDropList (cdkDropListDropped)="dropItem($event)" [cdkDropListData]="arrayValue">
<!-- <div *ngIf="arrayValue.length === 0" class="w-full h-6"></div> -->
@for (item of arrayValue; track trackByIndex(i, item); let i = $index) {
<div cdkDrag class="flex my-2 mr-2 items-center">
<label for="item-{{ i }}" class="text-gray-300 mr-1 hover:cursor-move" cdkDragHandle
>{{ i }}:</label
>
@if (paramInfo?.schema.items.type === 'object') {
<!-- @if (paramInfo?.schema.items.type === 'object') {
<app-params-form
[paramsSchema]="paramInfo?.schema.items"
[data]="item"
(updated)="updateItem(i, $event)"
></app-params-form>
} @else {
} -->
@if (paramInfo?.schema.items.type !== 'object') {
<!-- TODO(jwetzell): add input validation using info from schema -->
<input
id="item-{{ i }}"
+3 -4
View File
@@ -1,17 +1,16 @@
import { CdkDrag, CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';
import { Component, inject, Input, OnInit } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatIconModule } from '@angular/material/icon';
import { ParamInfo } from '../../models/form.model';
import { ListsService } from '../../services/lists.service';
import { SchemaService } from '../../services/schema.service';
import { MatIconModule } from '@angular/material/icon';
import { FormsModule } from '@angular/forms';
import { ParamsFormComponent } from '../params-form/params-form.component';
@Component({
selector: 'app-array-form',
templateUrl: './array-form.component.html',
styleUrl: './array-form.component.css',
imports: [MatIconModule, FormsModule, ParamsFormComponent, CdkDrag, CdkDropList],
imports: [MatIconModule, FormsModule, CdkDrag, CdkDropList],
standalone: true,
})
export class ArrayFormComponent implements OnInit {