Represents a reusable component for displaying and managing files.

  • Type Parameters

    • Payload extends unknown = any

      The payload type (optional)

    Parameters

    • params: IParams<Payload>

      The parameters for the component.

      • data

        The initial data for the files (optional).

      • withActionButton

        Determines if the submit button is displayed (default: true).

      • withStaticAction

        Determines if the submit button should fail silently when clicked (default: false).

      • readonly

        Determines if the files are readonly (optional).

      • submitLabel

        The label for the submit button (default: "Save").

      • payload

        The payload for the component (optional).

      • fullScreen

        Determines if the component should be displayed in full screen mode (default: false).

      • sizeRequest

        A function that computes the size request for the component (optional).

      • onChange

        A callback function for changes in the files (optional).

      • onSubmit

        A callback function for submitting the files (optional).

      • tr

        The translations for the component (optional).

      • fallback

        The fallback component for unsupported file types (optional).

      • onLoadStart

        A callback function for when loading starts (optional).

      • onLoadEnd

        A callback function for when loading ends (optional).

      • onClick

        A callback function for clicking on a file (optional).

      • onUpload

        A callback function for uploading a file (optional).

    Returns { pickFiles: () => void; render: () => Element }

    • An object with the render function for the component and the pickFiles function to open the file picker.