File

libs/core/dynamic-form/rating/src/rating.model.ts

Description

Configuration for a dynamic rating field.

Extends

Omit

Index

Properties

Properties

endLabel (Optional)
Type string
Description

Option to set the label painted at the end of the rating component.

Defaults to empty

startLabel (Optional)
Type string
Description

Option to set the label painted at the start of the rating component.

Defaults to empty

type
Description

Specifies the type of the field as RATING.

value (Optional)
Type "0" | "1" | "2" | "3" | "4" | "5"
Description

Option to set the selected rating 1 - 5.

Defaults to 0

import { DfInteractiveBaseConfig } from '@allianz/taly-core/dynamic-form';

/**
 * The value to use for the `type` attribute of rating
 * formfield configs.
 */
export const DfRatingTypeName = 'RATING';

/**
 * Configuration for a dynamic rating field.
 */
export interface DfRatingConfig
  extends Omit<DfInteractiveBaseConfig, 'hint' | 'note' | 'infoIcon'> {
  /**
   * Specifies the type of the field as `RATING`.
   */
  type: typeof DfRatingTypeName;

  /**
   * Option to set the label painted at the end of the rating component.
   *
   * Defaults to empty
   */
  endLabel?: string;

  /**
   * Option to set the label painted at the start of the rating component.
   *
   * Defaults to empty
   */
  startLabel?: string;

  /**
   * Option to set the selected rating 1 - 5.
   *
   * Defaults to 0
   */
  value?: 0 | 1 | 2 | 3 | 4 | 5;
}

results matching ""

    No results matching ""