Trilium Frontend API
    Preparing search index...

    Interface OptionsPagination

    interface OptionsPagination {
        dataReceiveParams?: Record<string, string>;
        dataSendParams?: Record<string, string>;
        pagination?: boolean;
        paginationAddRow?: "table" | "page";
        paginationButtonCount?: number;
        paginationCounter?:
            | "rows"
            | "pages"
            | (
                (
                    pageSize: number,
                    currentRow: number,
                    currentPage: number,
                    totalRows: number,
                    totalPages: number,
                ) => string | HTMLElement
            );
        paginationCounterElement?: string | HTMLElement;
        paginationElement?: string | HTMLElement;
        paginationInitialPage?: number;
        paginationMode?: SortMode;
        paginationSize?: number | true;
        paginationSizeSelector?: true | any[] | number[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    dataReceiveParams?: Record<string, string>

    Lookup list to link expected data fields from the server to their function

    default: {
    "current_page": "current_page",
    "last_page": "last_page",
    "data": "data",
    }
    dataSendParams?: Record<string, string>

    Lookup list to link fields expected by the server to their function

    default: {
    "page": "page",
    "size": "size",
    "sorters": "sorters",
    "filters": "filters",
    }
    pagination?: boolean
    paginationAddRow?: "table" | "page"

    When using the addRow function on a paginated table, rows will be added relative to the current page (ie to the top or bottom of the current page), with overflowing rows being shifted onto the next page.

    If you would prefer rows to be added relative to the table (firs/last page) then you can use the paginationAddRow option. it can take one of two values:

    page - add rows relative to current page (default) table - add rows relative to the table

    paginationButtonCount?: number

    The number of pagination page buttons shown in the footer using the paginationButtonCount option. By default this has a value of 5.

    paginationCounter?:
        | "rows"
        | "pages"
        | (
            (
                pageSize: number,
                currentRow: number,
                currentPage: number,
                totalRows: number,
                totalPages: number,
            ) => string | HTMLElement
        )

    You can choose to display a pagination counter in the bottom left of the footer that shows a summary of the current number of rows shown out of the total. If you want to have a fully customized counter, then you can pass a function to the paginationCounter option

    The formatter function accepts 5 arguments:

    pageSize - Number of rows shown per page currentRow - First visible row position currentPage - Current page totalRows - Total rows in table totalPages - Total pages in table The function must return the contents of the counter, either the text value of the counter, valid HTML or a DOM node

    paginationCounterElement?: string | HTMLElement

    By default the counter will be displayed in the left of the table footer. If you would like it displayed in another element pass a DOM node or a CSS selector for that element.

    paginationElement?: string | HTMLElement

    By default the pagination controls are added to the footer of the table. If you wish the controls to be created in another element pass a DOM node or a CSS selector for that element to the paginationElement option.

    paginationInitialPage?: number

    Specify that a specific page should be loaded when the table first load.

    paginationMode?: SortMode
    paginationSize?: number | true

    Set the number of rows in each page.

    paginationSizeSelector?: true | any[] | number[]

    Setting this option to true will cause Tabulator to create a list of page size options, that are multiples of the current page size. In the example below, the list will have the values of 5, 10, 15 and 20.

    When using the page size selector like this, if you use the setPageSize function to set the page size to a value not in the list, the list will be regenerated using the new page size as the starting valuer