vault/ui/app/utils/forms/field-group.ts
Jordan Reimer 771d8c6e7f
[UI] Ember Data Migration - Sync Destination Create/Edit (#30620)
* adds field group support to forms

* adds forms for sync destination types

* adds type for sync destination form

* adds readonlyParams to sync-destinations helper and error handling to findDestination util

* updates sync destinations create/edit routes to use forms

* updates sync create-and-edit component to use form class and api service

* updates sync destinations tests
2025-05-14 20:00:28 -06:00

17 lines
504 B
TypeScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import type FormField from './field';
// very simple util class that accepts a key and an array of form fields
// returns an object in the expected shape for use in the formFieldsGroup array of forms
export default class FormFieldGroup {
[key: string]: FormField[]; // Add an index signature to allow dynamic property assignment
constructor(groupName: string, fields: FormField[]) {
this[groupName] = fields;
}
}