Trilium Frontend API
    Preparing search index...

    Interface OptionsData

    interface OptionsData {
        ajaxConfig?: HttpMethod | AjaxConfig;
        ajaxContentType?: "form" | "json" | AjaxContentType;
        ajaxFiltering?: boolean;
        ajaxLoader?: boolean | (() => boolean);
        ajaxLoaderError?: string;
        ajaxLoaderLoading?: string;
        ajaxParams?: {};
        ajaxRequestFunc?: (url: string, config: any, params: any) => Promise<any>;
        ajaxRequesting?: (url: string, params: any) => boolean;
        ajaxResponse?: (url: string, params: any, response: any) => any;
        ajaxSorting?: boolean;
        ajaxURL?: string;
        ajaxURLGenerator?: (url: string, config: any, params: any) => string;
        autoTables?: boolean;
        data?: any[];
        dataLoader?: boolean;
        dataLoaderError?: string;
        dataLoaderErrorTimeout?: number;
        dataLoaderLoading?: string | HTMLElement;
        filterMode?: SortMode;
        importFormat?:
            | "csv"
            | "json"
            | "array"
            | ((fileContents: string) => unknown[]);
        importReader?: "binary" | "text" | "url" | "buffer";
        index?: string | number;
        progressiveLoad?: "load" | "scroll";
        progressiveLoadDelay?: number;
        progressiveLoadScrollMargin?: number;
        sortMode?: SortMode;
    }

    Hierarchy (View Summary)

    Index

    Properties

    ajaxConfig?: HttpMethod | AjaxConfig

    The HTTP request type for Ajax requests or config object for the request.

    ajaxContentType?: "form" | "json" | AjaxContentType

    When using a request method other than "GET" Tabulator will send any parameters with a content type of form data. You can change the content type with the ajaxContentType option. This will ensure parameters are sent in the format you expect, with the correct headers. * * The ajaxContentType option can take one of two values: "form" - send parameters as form data (default option) "json" - send parameters as JSON encoded string If you want to use a custom content type then you can pass a content type formatter object into the ajaxContentType option. this object must have two properties, the headers property should contain all headers that should be sent with the request and the body property should contain a function that returns the body content of the request

    ajaxFiltering?: boolean

    Send filter config to server instead of processing locally

    ajaxLoader?: boolean | (() => boolean)

    Show loader while data is loading, can also take a function that must return a boolean.

    ajaxLoaderError?: string

    html for the loader element in the event of an error.

    ajaxLoaderLoading?: string

    html for loader element.

    ajaxParams?: {}

    Parameters to be passed to remote Ajax data loading request.

    ajaxRequestFunc?: (url: string, config: any, params: any) => Promise<any>

    callback function to replace inbuilt ajax request functionality

    ajaxRequesting?: (url: string, params: any) => boolean

    The ajaxRequesting callback is triggered when ever an ajax request is made.

    ajaxResponse?: (url: string, params: any, response: any) => any

    The ajaxResponse callback is triggered when a successful ajax request has been made. This callback can also be used to modify the received data before it is parsed by the table. If you use this callback it must return the data to be parsed by Tabulator, otherwise no data will be rendered.

    ajaxSorting?: boolean

    Send sorter config to server instead of processing locally

    ajaxURL?: string

    If you wish to retrieve your data from a remote source you can set the URL for the request in the ajaxURL option.

    ajaxURLGenerator?: (url: string, config: any, params: any) => string

    If you need more control over the url of the request that you can get from the ajaxURL and ajaxParams properties, the you can use the ajaxURLGenerator property to pass in a callback that will generate the URL for you.

    The callback should return a string representing the URL to be requested.

    autoTables?: boolean
    data?: any[]

    Array to hold data that should be loaded on table creation.

    dataLoader?: boolean
    dataLoaderError?: string
    dataLoaderErrorTimeout?: number
    dataLoaderLoading?: string | HTMLElement
    filterMode?: SortMode
    importFormat?: "csv" | "json" | "array" | ((fileContents: string) => unknown[])
    importReader?: "binary" | "text" | "url" | "buffer"

    By default Tabulator will read in the file as plain text, which is the format used by all the built in importers. If you need to read the file data in a different format then you can use the importReader option to instruct the file reader to read in the file in a different format.

    index?: string | number

    A unique index value should be present for each row of data if you want to be able to programmatically alter that data at a later point, this should be either numeric or a string. By default Tabulator will look for this value in the id field for the data. If you wish to use a different field as the index, set this using the index option parameter.

    progressiveLoad?: "load" | "scroll"

    If you are loading a lot of data from a remote source into your table in one go, it can sometimes take a long time for the server to return the request, which can slow down the user experience.

    To speed things up in this situation Tabulator has a progressive load mode, this uses the pagination module to make a series of requests for part of the data set, one at a time, appending it to the table as the data arrives. This mode can be enable using the ajaxProgressiveLoad option. No pagination controls will be visible on screen, it just reuses the functionality of the pagination module to sequentially load the data.

    With this mode enabled, all of the settings outlined in the Ajax Documentation are still available

    There are two different progressive loading modes, to give you a choice of how data is loaded into the table.

    progressiveLoadDelay?: number

    By default tabulator will make the requests to fill the table as quickly as possible. On some servers these repeats requests from the same client may trigger rate limiting or security systems. In this case you can use the ajaxProgressiveLoadDelay option to add a delay in milliseconds between each page request.

    progressiveLoadScrollMargin?: number

    The ajaxProgressiveLoadScrollMargin property determines how close to the bottom of the table in pixels, the scroll bar must be before the next page worth of data is loaded, by default it is set to twice the height of the table.

    sortMode?: SortMode