Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

FieldArrayApi interface

Signature

typescript
export interface FieldArrayApi 

Import

typescript
import { FieldArrayApi } from '@grafana/ui';

Properties

PropertyTypeDescription
append(value: FieldArrayValue) => void
fieldsArray<Record<string, any>>
insert(index: number, value: FieldArrayValue) => void
move(from: number, to: number) => void
prepend(value: FieldArrayValue) => void
remove(index?: number | number[]) => void
swap(indexA: number, indexB: number) => void

append property

Signature

typescript
append: (value: FieldArrayValue) => void;

fields property

Signature

typescript
fields: Array<Record<string, any>>;

insert property

Signature

typescript
insert: (index: number, value: FieldArrayValue) => void;

move property

Signature

typescript
move: (from: number, to: number) => void;

prepend property

Signature

typescript
prepend: (value: FieldArrayValue) => void;

remove property

Signature

typescript
remove: (index?: number | number[]) => void;

swap property

Signature

typescript
swap: (indexA: number, indexB: number) => void;