mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 15:11:07 +02:00
* 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
17 lines
504 B
TypeScript
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;
|
|
}
|
|
}
|