FileField component.

  • Parameters

    • props: IFileFieldProps<any, any> & IFileFieldPrivate<any>

      The props object.

      Interface representing props for the IFileField component.

      • Optionaldescription?: string

        Type definition for the PickProp function. Extracts a specific property description from a given object type IField<Data, Payload>.

        The type of data associated with the field.

        The type of payload associated with the field.

        The type of the object from which to pick the description property.

        The object from which to pick the description property.

        • The value of the description property if found, otherwise undefined.
      • Optionaldisabled?: boolean

        Represents the "disabled" property of a field.

      • OptionalfileAccept?: string

        Represents the fileAccept property of a field.

        The type of data associated with the field.

        The type of payload associated with the field.

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

        Represents a reference to a group within a field.

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

        Represents the input reference associated with a field in a specific data payload.

      • Optionaloutlined?: boolean

        Picks the "outlined" property from a given object type.

      • Optionalplaceholder?: string

        Type definition for the placeholder property of a field.

        The type of the field.

        The key of the property to pick.

        The data object containing the field.

        The payload type for the field.

        The field object.

        • The value of the field's placeholder property.
      • Optionalreadonly?: boolean

        Retrieves the value of the "readonly" property from the provided object.

        The type of the object containing the "readonly" property.

        The type of the data stored in the "IField" object.

        The type of the payload stored in the "IField" object.

        The object from which to retrieve the "readonly" property.

        • The value of the "readonly" property, or undefined if it is not present.
      • Optionaltitle?: string

        Type definition for the 'title' property of the PickProp utility.

        The type of object from which to pick the property.

        The key of the property to be picked.

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

        The translate label for FieldType.File

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

        Represents the 'upload' property of a given object.

      • 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.

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

        This variable represents a property 'view' extracted from an object of type PickProp<IField<Data, Payload>, 'view'>. The 'view' property is used to specify a specific view for processing fields.

        The 'IField' type is a generic type that takes two type parameters: 'Data' and 'Payload'. It represents a field in a form, with 'Data' representing the data type of the field value , and 'Payload' representing additional payload data associated with the field.

        The 'PickProp' utility type is used to extract the 'view' property from the 'IField' type.

      Interface representing a private file field.

      • 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 File component with the given props.

Properties

Properties

displayName: string