@nextcloud/files
    Preparing search index...

    Interface ViewData

    interface ViewData {
        caption?: string;
        columns?: Column[];
        defaultSortKey?: string;
        emptyCaption?: string;
        emptyTitle?: string;
        emptyView?: (div: HTMLDivElement) => void;
        expanded?: boolean;
        getContents: (path: string) => Promise<ContentsWithRoot>;
        hidden?: true;
        icon: string;
        id: string;
        loadChildViews?: (view: View) => Promise<void>;
        name: string;
        order?: number;
        params?: Record<string, string>;
        parent?: string;
        sticky?: boolean;
    }

    Implemented by

    Index

    Properties

    caption?: string

    Translated accessible description of the view

    columns?: Column[]

    This view column(s). Name and actions are by default always included

    defaultSortKey?: string

    Will be used as default if the user haven't customized their sorting column

    emptyCaption?: string

    Translated description of the empty view

    emptyTitle?: string

    Translated title of the empty view

    emptyView?: (div: HTMLDivElement) => void

    Custom implementation of the empty view. If set and no content is found for the current view, then this method is called with the container element where to render your empty view implementation.

    Type Declaration

    expanded?: boolean

    This view has children and is expanded (by default) or not. This will be overridden by user config.

    getContents: (path: string) => Promise<ContentsWithRoot>

    Method return the content of the provided path This ideally should be a cancellable promise. promise.cancel(reason) will be called when the directory change and the promise is not resolved yet. You must also return the current directory information alongside with its content.

    hidden?: true

    If set then the view will be hidden from the navigation unless its the active view.

    icon: string

    The view icon as an inline svg

    id: string

    Unique view ID

    loadChildViews?: (view: View) => Promise<void>

    Method called to load child views if any

    name: string

    Translated view name

    order?: number

    The view order. If not set will be natural sorted by view name.

    params?: Record<string, string>

    Custom params to give to the router on click If defined, will be treated as a dummy view and will just redirect and not fetch any contents.

    parent?: string

    The parent unique ID

    sticky?: boolean

    This view is sticky (sent at the bottom)