A component for rendering a DictField.

  • Parameters

    • DictFieldProps: IDictFieldProps<any, any> & IDictFieldPrivate<any>

      The props for the DictField component.

      Props for the IDictField component.

      • Optionaldescription?: string

        The description of the field.

      • OptionaldictCreateButton?: any

        The button to create a new item in the dictionary.

      • OptionaldictDelay?: number

        The delay between input and dictionary search.

      • OptionaldictLimit?: number

        The limit of items shown in the dictionary.

      • OptionaldictOnAppend?: (
            search: string,
            data: Data,
            payload: Payload,
            onValueChange: (value: null | string) => void,
            onChange: (value: Data) => void,
        ) => void

        The function called when an item is appended to the dictionary.

      • OptionaldictOnItem?: (
            value: null | string,
            data: Data,
            payload: Payload,
            onValueChange: (value: null | string) => void,
            onChange: (data: Data) => void,
        ) => void

        The function called when a dictionary item is selected.

      • OptionaldictOnText?: (
            text: string,
            data: Data,
            payload: Payload,
            onValueChange: (value: null | string) => void,
            onChange: (data: Data) => void,
        ) => void

        The function called when the text of a dictionary item is updated.

      • OptionaldictSearch?: (
            dto: {
                data: Data;
                initial: boolean;
                limit: number;
                offset: number;
                payload: Payload;
                rows: ISearchItem<any>[];
                search: string;
            },
        ) => ISearchItem<any>[]
        | Promise<ISearchItem<any>[]>

        The search function for the dictionary.

      • OptionaldictSearchItem?: any

        The item being searched in the dictionary.

      • OptionaldictSearchText?: (data: Data, payload: Payload) => string | Promise<string>

        The text being searched in the dictionary.

      • OptionaldictValue?: (
            value: string,
            data: Data,
            payload: Payload,
        ) => ISearchItem<any> | Promise<ISearchItem<any>>

        The selected value from the dictionary.

      • Optionaldisabled?: boolean

        Whether the field should be disabled.

      • OptionalgroupRef?: (element?: null | HTMLDivElement) => void

        The ref for the group element.

      • OptionalinputAutocomplete?: "new-password" | "on" | "off" | "false"

        The autocomplete option for the input.

      • OptionalinputFormatter?: (input: string) => string

        The function to format the input value.

      • OptionalinputFormatterAllowed?: RegExp | (char: string, idx: number) => boolean

        The allowed characters for formatting.

      • OptionalinputFormatterReplace?: (char: string) => null | string

        The replace option for formatting.

      • OptionalinputFormatterSymbol?: string

        The symbol used for formatting.

      • OptionalinputFormatterTemplate?: string

        The template for formatting.

      • OptionalinputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal"

        The input mode.

      • OptionalinputPattern?: string

        The regex pattern for input validation.

      • OptionalinputRef?: (element?: null | HTMLInputElement) => void

        The ref for the input element.

      • OptionalinputType?:
            | "number"
            | "color"
            | "search"
            | "text"
            | "date"
            | "email"
            | "month"
            | "password"
            | "tel"
            | "time"
            | "url"
            | "week"

        The type of input element.

      • OptionalleadingIcon?: any

        The icon element for the leading icon.

      • OptionalleadingIconClick?: (
            value: Value,
            data: Data,
            payload: Payload,
            onValueChange: (v: Value) => void,
            onChange: (data: Data) => void,
        ) => void

        The function to call when the leading icon is clicked.

      • OptionalleadingIconRipple?: boolean

        Whether the leading icon should have ripple effect.

      • OptionalleadingIconTabIndex?: number
      • Optionaloutlined?: boolean

        Whether the field should be outlined.

      • Optionalplaceholder?: string

        The placeholder text for the input.

      • Optionalreadonly?: boolean

        Whether the field should be read-only.

      • Optionaltitle?: string

        The title of the field.

      • OptionaltrailingIcon?: any

        The icon element for the trailing icon.

      • OptionaltrailingIconClick?: (
            value: Value,
            data: Data,
            payload: Payload,
            onValueChange: (v: Value) => void,
            onChange: (data: Data) => void,
        ) => void

        The function to call when the trailing icon is clicked.

      • OptionaltrailingIconRipple?: boolean

        Whether the trailing icon should have ripple effect.

      • OptionaltrailingIconTabIndex?: number
      • Optionalvalidation?: IValidation

        Validation factory config

        Type representing the field object.

        Type representing the data object.

        Type representing the payload object.

        The value of the "validation" property.

      • dirty: boolean
      • disabled: boolean
      • incorrect: null | string
      • invalid: null | string
      • loading: boolean
      • name: string
      • onChange: (v: any, config?: { skipReadonly?: boolean }) => void
      • value: any

    Returns Element

    • The rendered DictField component.

Properties

Properties

displayName: string