mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-14 10:53:39 +00:00
remove object type from array-form
This commit is contained in:
@@ -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 }}"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user