Props for the IItemsField component.

interface IItemsFieldProps<Data = IAnything, Payload = IAnything> {
    description?: string;
    disabled?: boolean;
    freeSolo?: boolean;
    groupRef?: (element?: null | HTMLDivElement) => void;
    itemList?:
        | string[]
        | (data: Data, payload: Payload) => string[]
        | (data: Data, payload: Payload) => Promise<string[]>;
    labelShrink?: boolean;
    noDeselect?: boolean;
    outlined?: boolean;
    placeholder?: string;
    readonly?: boolean;
    title?: string;
    tr?:
        | (s: string, data: Data, payload: Payload) => string
        | (s: string, data: Data, payload: Payload) => Promise<string>;
    validation?: IValidation;
    virtualListBox?: boolean;
    watchItemList?: boolean;
}

Type Parameters

  • Data = IAnything

    The type of data for the field.

  • Payload = IAnything

    The type of payload for the field.

Hierarchy (View Summary)

Properties

description?: string

Returns the "description" property of the given object if it exists, otherwise returns undefined.

The type of the object to pick the property from.

The key of the property to pick.

The object to pick the property from.

The key of the property to pick.

  • The value of the "description" property if it exists, otherwise undefined.
disabled?: boolean

Represents the "disabled" property of a field.

freeSolo?: boolean

Represents the freeSolo property of a field object.

This property determines if the field supports selecting values that are not contained in the predefined options list.

groupRef?: (element?: null | HTMLDivElement) => void

Retrieves the value of the 'groupRef' property from the given object 'fieldData'.

Type declaration

    • (element?: null | HTMLDivElement): void
    • Parameters

      • Optionalelement: null | HTMLDivElement

      Returns void

      • The value of the 'groupRef' property from 'fieldData', or undefined if it doesn't exist.
itemList?:
    | string[]
    | (data: Data, payload: Payload) => string[]
    | (data: Data, payload: Payload) => Promise<string[]>

Represents the itemList property of a field in the Data object.

labelShrink?: boolean

Represents the optional "labelShrink" property of an object that implements the IField<Data> interface. The "labelShrink" property is of type PickProp<IField<Data>, "labelShrink">, which picks the "labelShrink" property from the IField<Data> interface.

noDeselect?: boolean

Represents a configuration option for disabling deselect functionality.

The type of data associated with the field.

The type of payload associated with the field.

outlined?: boolean

Picks the specified property "outlined" from the given object type "IField<Data, Payload>".

The type of data for the field.

The type of payload for the field.

The resulting type after picking the property.

The object from which to pick the property.

  • The value of the "outlined" property.
placeholder?: string

Type definition for the placeholder property.

The type of the field.

The type of the key to pick from the field.

The field object.

The key representing the property to pick from the field.

The picked placeholder property from the field.

readonly?: boolean

Represents an optional readonly flag of a field.

title?: string

Type definition for the "title" property of an object.

Suppose we have an object of type "IField<Data, Payload>". This type represents a field in a form, where "Data" is the type of the form data and "Payload" is the type of data that should be submitted when the form is submitted.

The "PickProp" utility type is used to extract the "title" property from the "IField<Data, Payload>" type. This variable represents the extracted type.

The type of the form data.

The type of the data to be submitted.

tr?:
    | (s: string, data: Data, payload: Payload) => string
    | (s: string, data: Data, payload: Payload) => Promise<string>

Represents the "tr" property of a field in the given data and payload.

The type of data.

The type of payload.

The type of field.

The type for picking properties.

validation?: 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.

virtualListBox?: boolean

Represents the configuration for a virtual list box field in a form.

watchItemList?: boolean

Represents a variable watchItemList.