libs/core/dynamic-form/radio/src/radio.model.ts
Configuration for a dynamic radiobutton group field.
Omit
Properties |
|
horizontalLayout (Optional) | |
Type |
boolean
|
Description
|
Option to enable horizontal layout via configuration |
type | |
Description
|
Specifies the type of the field as |
import { DfInteractiveBaseConfig, DfOptions } from '@allianz/taly-core/dynamic-form';
/**
* The value to use for the `type` attribute of radiobutton group
* formfield configs.
*/
export const DfRadioTypeName = 'RADIO';
/**
* Configuration for a dynamic radiobutton group field.
*
* @additionalProperties false
*/
export interface DfRadioConfig extends Omit<DfInteractiveBaseConfig, 'hint'> {
/**
* Specifies the type of the field as `RADIO`.
*/
type: typeof DfRadioTypeName;
/**
* The "options" property can take one of two forms:
* 1. A hardcoded array of objects for direct display in a radio group. Each object must have a "label" to display and a corresponding "value".
* 2. A string that represents an expression. This expression is used by an option provider service to dynamically fetch the radio options.
*
* @examples [[{"label": "The first option", "value": "1"}], "$.myExpression"]
*/
options: DfOptions[] | string;
/**
* Option to enable horizontal layout via configuration
*/
horizontalLayout?: boolean;
}