Trilium Frontend API
    Preparing search index...

    Interface EventCallBackMethods

    interface EventCallBackMethods {
        ajaxError: () => void;
        cellClick: (event: UIEvent, cell: CellComponent) => void;
        cellContext: (event: UIEvent, cell: CellComponent) => void;
        cellDblClick: (event: UIEvent, cell: CellComponent) => void;
        cellDblTap: (event: UIEvent, cell: CellComponent) => void;
        cellEditCancelled: (cell: CellComponent) => void;
        cellEdited: (cell: CellComponent) => void;
        cellEditing: (cell: CellComponent) => void;
        cellMouseDown: (event: UIEvent, cell: CellComponent) => void;
        cellMouseEnter: (event: UIEvent, cell: CellComponent) => void;
        cellMouseLeave: (event: UIEvent, cell: CellComponent) => void;
        cellMouseMove: (event: UIEvent, cell: CellComponent) => void;
        cellMouseOut: (event: UIEvent, cell: CellComponent) => void;
        cellMouseOver: (event: UIEvent, cell: CellComponent) => void;
        cellMouseUp: (event: UIEvent, cell: CellComponent) => void;
        cellTap: (event: UIEvent, cell: CellComponent) => void;
        cellTapHold: (event: UIEvent, cell: CellComponent) => void;
        clipboardCopied: (clipboard: string) => void;
        clipboardPasted: (
            clipboard: string,
            rowData: any[],
            rows: RowComponent[],
        ) => void;
        clipboardPasteError: (clipboard: string) => void;
        columnMoved: (column: ColumnComponent, columns: ColumnComponent[]) => void;
        columnResized: (column: ColumnComponent) => void;
        columnResizing: (column: ColumnComponent) => void;
        columnsLoaded: (columns: ColumnComponent[]) => void;
        columnTitleChanged: (column: ColumnComponent) => void;
        columnVisibilityChanged: (
            column: ColumnComponent,
            visible: boolean,
        ) => void;
        columnWidth: (column: ColumnComponent) => void;
        dataChanged: (data: any[]) => void;
        dataFiltered: (filters: Filter[], rows: RowComponent[]) => void;
        dataFiltering: (filters: Filter[]) => void;
        dataGrouped: (groups: GroupComponent[]) => void;
        dataGrouping: () => void;
        dataLoaded: (data: any[]) => void;
        dataLoadError: (error: Error) => void;
        dataLoading: (data: any[]) => void;
        dataProcessed: (data: any[]) => void;
        dataProcessing: (data: any[]) => void;
        dataSorted: (sorters: SorterFromTable[], rows: RowComponent[]) => void;
        dataSorting: (sorters: SorterFromTable[]) => void;
        dataTreeRowCollapsed: (row: RowComponent, level: number) => void;
        dataTreeRowExpanded: (row: RowComponent, level: number) => void;
        downloadComplete: () => void;
        groupClick: (event: UIEvent, group: GroupComponent) => void;
        groupContext: (event: UIEvent, group: GroupComponent) => void;
        groupDblClick: (event: UIEvent, group: GroupComponent) => void;
        groupDblTap: (event: UIEvent, group: GroupComponent) => void;
        groupMouseDown: (event: UIEvent, group: GroupComponent) => void;
        groupMouseUp: (event: UIEvent, group: GroupComponent) => void;
        groupTap: (event: UIEvent, group: GroupComponent) => void;
        groupTapHold: (event: UIEvent, group: GroupComponent) => void;
        groupVisibilityChanged: (group: GroupComponent, visible: boolean) => void;
        headerClick: (event: UIEvent, column: ColumnComponent) => void;
        headerContext: (event: UIEvent, column: ColumnComponent) => void;
        headerDblClick: (event: UIEvent, column: ColumnComponent) => void;
        headerDblTap: (event: UIEvent, column: ColumnComponent) => void;
        headerMouseDown: (event: UIEvent, column: ColumnComponent) => void;
        headerMouseUp: (event: UIEvent, column: ColumnComponent) => void;
        headerTap: (event: UIEvent, column: ColumnComponent) => void;
        headerTapHold: (event: UIEvent, column: ColumnComponent) => void;
        historyRedo: (action: HistoryAction, component: any, data: any[]) => void;
        historyUndo: (action: HistoryAction, component: any, data: any[]) => void;
        htmlImported: () => void;
        htmlImporting: () => void;
        importChoose: () => void;
        importError: (err: unknown) => void;
        importImported: (data: unknown) => void;
        importImporting: (files: File[]) => void;
        localized: (locale: string, lang: any) => void;
        menuClosed: (cell: CellComponent) => void;
        menuOpened: (cell: CellComponent) => void;
        movableRowsElementDrop: (
            event: UIEvent,
            element: Element,
            row: RowComponent,
        ) => void;
        movableRowsReceived: (
            fromRow: RowComponent,
            toRow: RowComponent,
            fromTable: Tabulator,
        ) => void;
        movableRowsReceivedFailed: (
            fromRow: RowComponent,
            toRow: RowComponent,
            fromTable: Tabulator,
        ) => void;
        movableRowsReceivingStart: (
            fromRow: RowComponent,
            fromTable: Tabulator,
        ) => void;
        movableRowsReceivingStop: (fromTable: Tabulator) => void;
        movableRowsSendingStart: (toTables: Tabulator[]) => void;
        movableRowsSendingStop: (toTables: Tabulator[]) => void;
        movableRowsSent: (
            fromRow: RowComponent,
            toRow: RowComponent,
            toTable: Tabulator,
        ) => void;
        movableRowsSentFailed: (
            fromRow: RowComponent,
            toRow: RowComponent,
            toTable: Tabulator,
        ) => void;
        pageLoaded: (pageNo: number) => void;
        pageSizeChanged: (pageSize: number) => void;
        popupClosed: (cell: CellComponent) => void;
        popupOpen: (cell: CellComponent) => void;
        rangeAdded: (range: RangeComponent) => void;
        rangeChanged: (range: RangeComponent) => void;
        rangeRemoved: (range: RangeComponent) => void;
        renderComplete: () => void;
        renderStarted: () => void;
        rowAdded: (row: RowComponent) => void;
        rowClick: (event: UIEvent, row: RowComponent) => void;
        rowContext: (event: UIEvent, row: RowComponent) => void;
        rowDblClick: (event: UIEvent, row: RowComponent) => void;
        rowDblTap: (event: UIEvent, row: RowComponent) => void;
        rowDeleted: (row: RowComponent) => void;
        rowDeselected: (row: RowComponent) => void;
        rowHeight: (row: RowComponent) => void;
        rowMouseDown: (event: UIEvent, row: RowComponent) => void;
        rowMouseEnter: (event: UIEvent, row: RowComponent) => void;
        rowMouseLeave: (event: UIEvent, row: RowComponent) => void;
        rowMouseMove: (event: UIEvent, row: RowComponent) => void;
        rowMouseOut: (event: UIEvent, row: RowComponent) => void;
        rowMouseOver: (event: UIEvent, row: RowComponent) => void;
        rowMouseUp: (event: UIEvent, row: RowComponent) => void;
        rowMoveCancelled: (row: RowComponent) => void;
        rowMoved: (row: RowComponent) => void;
        rowMoving: (row: RowComponent) => void;
        rowResized: (row: RowComponent) => void;
        rowResizing: (row: RowComponent) => void;
        rowSelected: (row: RowComponent) => void;
        rowSelectionChanged: (
            data: any[],
            rows: RowComponent[],
            selectedRows: RowComponent[],
            deselectedRows: RowComponent[],
        ) => void;
        rowTap: (event: UIEvent, row: RowComponent) => void;
        rowTapHold: (event: UIEvent, row: RowComponent) => void;
        rowUpdated: (row: RowComponent) => void;
        scrollHorizontal: (left: number, leftDir: boolean) => void;
        scrollVertical: (top: number, topDir: boolean) => void;
        sheetAdded: (sheet: SpreadsheetComponent) => void;
        sheetLoaded: (sheet: SpreadsheetComponent) => void;
        sheetRemoved: (sheet: SpreadsheetComponent) => void;
        sheetUpdated: (sheet: SpreadsheetComponent) => void;
        tableBuilding: () => void;
        tableBuilt: () => void;
        tableDestroyed: () => void;
        TooltipClosed: (cell: CellComponent) => void;
        TooltipOpened: (cell: CellComponent) => void;
        validationFailed: (
            cell: CellComponent,
            value: any,
            validators: Validator[],
        ) => void;
    }
    Index

    Properties

    ajaxError cellClick cellContext cellDblClick cellDblTap cellEditCancelled cellEdited cellEditing cellMouseDown cellMouseEnter cellMouseLeave cellMouseMove cellMouseOut cellMouseOver cellMouseUp cellTap cellTapHold clipboardCopied clipboardPasted clipboardPasteError columnMoved columnResized columnResizing columnsLoaded columnTitleChanged columnVisibilityChanged columnWidth dataChanged dataFiltered dataFiltering dataGrouped dataGrouping dataLoaded dataLoadError dataLoading dataProcessed dataProcessing dataSorted dataSorting dataTreeRowCollapsed dataTreeRowExpanded downloadComplete groupClick groupContext groupDblClick groupDblTap groupMouseDown groupMouseUp groupTap groupTapHold groupVisibilityChanged headerClick headerContext headerDblClick headerDblTap headerMouseDown headerMouseUp headerTap headerTapHold historyRedo historyUndo htmlImported htmlImporting importChoose importError importImported importImporting localized menuClosed menuOpened movableRowsElementDrop movableRowsReceived movableRowsReceivedFailed movableRowsReceivingStart movableRowsReceivingStop movableRowsSendingStart movableRowsSendingStop movableRowsSent movableRowsSentFailed pageLoaded pageSizeChanged popupClosed popupOpen rangeAdded rangeChanged rangeRemoved renderComplete renderStarted rowAdded rowClick rowContext rowDblClick rowDblTap rowDeleted rowDeselected rowHeight rowMouseDown rowMouseEnter rowMouseLeave rowMouseMove rowMouseOut rowMouseOver rowMouseUp rowMoveCancelled rowMoved rowMoving rowResized rowResizing rowSelected rowSelectionChanged rowTap rowTapHold rowUpdated scrollHorizontal scrollVertical sheetAdded sheetLoaded sheetRemoved sheetUpdated tableBuilding tableBuilt tableDestroyed TooltipClosed TooltipOpened validationFailed

    Properties

    ajaxError: () => void
    cellClick: (event: UIEvent, cell: CellComponent) => void
    cellContext: (event: UIEvent, cell: CellComponent) => void
    cellDblClick: (event: UIEvent, cell: CellComponent) => void
    cellDblTap: (event: UIEvent, cell: CellComponent) => void
    cellEditCancelled: (cell: CellComponent) => void
    cellEdited: (cell: CellComponent) => void
    cellEditing: (cell: CellComponent) => void
    cellMouseDown: (event: UIEvent, cell: CellComponent) => void
    cellMouseEnter: (event: UIEvent, cell: CellComponent) => void
    cellMouseLeave: (event: UIEvent, cell: CellComponent) => void
    cellMouseMove: (event: UIEvent, cell: CellComponent) => void
    cellMouseOut: (event: UIEvent, cell: CellComponent) => void
    cellMouseOver: (event: UIEvent, cell: CellComponent) => void
    cellMouseUp: (event: UIEvent, cell: CellComponent) => void
    cellTap: (event: UIEvent, cell: CellComponent) => void
    cellTapHold: (event: UIEvent, cell: CellComponent) => void
    clipboardCopied: (clipboard: string) => void
    clipboardPasted: (
        clipboard: string,
        rowData: any[],
        rows: RowComponent[],
    ) => void
    clipboardPasteError: (clipboard: string) => void
    columnMoved: (column: ColumnComponent, columns: ColumnComponent[]) => void
    columnResized: (column: ColumnComponent) => void
    columnResizing: (column: ColumnComponent) => void

    The columnResizing event will be triggered when a column has started to be resized by the user.

    columnsLoaded: (columns: ColumnComponent[]) => void

    The columnsLoaded event is triggered when the replacement of the columns is complete. An array of column components is passed as the first argument of the callback.

    columnTitleChanged: (column: ColumnComponent) => void
    columnVisibilityChanged: (column: ColumnComponent, visible: boolean) => void
    columnWidth: (column: ColumnComponent) => void

    The columnWidth event will be triggered when the width of a column is set or changed.

    dataChanged: (data: any[]) => void
    dataFiltered: (filters: Filter[], rows: RowComponent[]) => void
    dataFiltering: (filters: Filter[]) => void
    dataGrouped: (groups: GroupComponent[]) => void
    dataGrouping: () => void
    dataLoaded: (data: any[]) => void
    dataLoadError: (error: Error) => void
    dataLoading: (data: any[]) => void
    dataProcessed: (data: any[]) => void
    dataProcessing: (data: any[]) => void
    dataSorted: (sorters: SorterFromTable[], rows: RowComponent[]) => void
    dataSorting: (sorters: SorterFromTable[]) => void
    dataTreeRowCollapsed: (row: RowComponent, level: number) => void
    dataTreeRowExpanded: (row: RowComponent, level: number) => void
    downloadComplete: () => void
    groupClick: (event: UIEvent, group: GroupComponent) => void
    groupContext: (event: UIEvent, group: GroupComponent) => void
    groupDblClick: (event: UIEvent, group: GroupComponent) => void
    groupDblTap: (event: UIEvent, group: GroupComponent) => void
    groupMouseDown: (event: UIEvent, group: GroupComponent) => void
    groupMouseUp: (event: UIEvent, group: GroupComponent) => void
    groupTap: (event: UIEvent, group: GroupComponent) => void
    groupTapHold: (event: UIEvent, group: GroupComponent) => void
    groupVisibilityChanged: (group: GroupComponent, visible: boolean) => void
    headerClick: (event: UIEvent, column: ColumnComponent) => void
    headerContext: (event: UIEvent, column: ColumnComponent) => void
    headerDblClick: (event: UIEvent, column: ColumnComponent) => void
    headerDblTap: (event: UIEvent, column: ColumnComponent) => void
    headerMouseDown: (event: UIEvent, column: ColumnComponent) => void
    headerMouseUp: (event: UIEvent, column: ColumnComponent) => void
    headerTap: (event: UIEvent, column: ColumnComponent) => void
    headerTapHold: (event: UIEvent, column: ColumnComponent) => void
    historyRedo: (action: HistoryAction, component: any, data: any[]) => void
    historyUndo: (action: HistoryAction, component: any, data: any[]) => void
    htmlImported: () => void
    htmlImporting: () => void
    importChoose: () => void

    The importChoose event is triggered the import function is called and the file picker modal opens.

    importError: (err: unknown) => void

    The importError event is triggered if there is an error importing the data from the file. The thrown error is passes as the first argument of the callback.

    importImported: (data: unknown) => void

    The importImported event is triggered when the data has been successfully parsed from the file, just before it is then loaded into the table. The parsed array of row data objects is passed as the first argument of the callback..

    importImporting: (files: File[]) => void

    The importImporting event is triggered after the user has chosen the file to import, but before it has been processed. The file array returned from the file pickers is passed as the first argument of the callback.

    localized: (locale: string, lang: any) => void
    menuClosed: (cell: CellComponent) => void
    menuOpened: (cell: CellComponent) => void
    movableRowsElementDrop: (
        event: UIEvent,
        element: Element,
        row: RowComponent,
    ) => void
    movableRowsReceived: (
        fromRow: RowComponent,
        toRow: RowComponent,
        fromTable: Tabulator,
    ) => void
    movableRowsReceivedFailed: (
        fromRow: RowComponent,
        toRow: RowComponent,
        fromTable: Tabulator,
    ) => void
    movableRowsReceivingStart: (fromRow: RowComponent, fromTable: Tabulator) => void
    movableRowsReceivingStop: (fromTable: Tabulator) => void
    movableRowsSendingStart: (toTables: Tabulator[]) => void
    movableRowsSendingStop: (toTables: Tabulator[]) => void
    movableRowsSent: (
        fromRow: RowComponent,
        toRow: RowComponent,
        toTable: Tabulator,
    ) => void
    movableRowsSentFailed: (
        fromRow: RowComponent,
        toRow: RowComponent,
        toTable: Tabulator,
    ) => void
    pageLoaded: (pageNo: number) => void
    pageSizeChanged: (pageSize: number) => void
    popupClosed: (cell: CellComponent) => void
    popupOpen: (cell: CellComponent) => void
    rangeAdded: (range: RangeComponent) => void

    The range component provides access to a selected range of cells. The example below shows how it is passed to the rangeAdded callback

    table.on("rangeAdded", function(range) {
    // range - range component for the selected range
    alert("The user has selected a new range containing " + range.getCells().length + " cells");
    });
    rangeChanged: (range: RangeComponent) => void

    The rangeChanged event is triggered when a the bounds of an existing range are changed.

    table.on("rangeChanged", function(range){
    // range - range component for the selected range
    });
    rangeRemoved: (range: RangeComponent) => void

    The rangeRemoved event is triggered when a range is removed from the table.

    table.on("rangeRemoved", function(range){
    // range - range component for the selected range
    });
    renderComplete: () => void
    renderStarted: () => void
    rowAdded: (row: RowComponent) => void
    rowClick: (event: UIEvent, row: RowComponent) => void
    rowContext: (event: UIEvent, row: RowComponent) => void
    rowDblClick: (event: UIEvent, row: RowComponent) => void
    rowDblTap: (event: UIEvent, row: RowComponent) => void
    rowDeleted: (row: RowComponent) => void
    rowDeselected: (row: RowComponent) => void
    rowHeight: (row: RowComponent) => void

    The rowHeight event will be triggered when the width of a row is set or changed.

    rowMouseDown: (event: UIEvent, row: RowComponent) => void
    rowMouseEnter: (event: UIEvent, row: RowComponent) => void
    rowMouseLeave: (event: UIEvent, row: RowComponent) => void
    rowMouseMove: (event: UIEvent, row: RowComponent) => void
    rowMouseOut: (event: UIEvent, row: RowComponent) => void
    rowMouseOver: (event: UIEvent, row: RowComponent) => void
    rowMouseUp: (event: UIEvent, row: RowComponent) => void
    rowMoveCancelled: (row: RowComponent) => void
    rowMoved: (row: RowComponent) => void
    rowMoving: (row: RowComponent) => void
    rowResized: (row: RowComponent) => void
    rowResizing: (row: RowComponent) => void

    The rowResizing event will be triggered when a row has started to be resized by the user.

    rowSelected: (row: RowComponent) => void
    rowSelectionChanged: (
        data: any[],
        rows: RowComponent[],
        selectedRows: RowComponent[],
        deselectedRows: RowComponent[],
    ) => void
    rowTap: (event: UIEvent, row: RowComponent) => void
    rowTapHold: (event: UIEvent, row: RowComponent) => void
    rowUpdated: (row: RowComponent) => void
    scrollHorizontal: (left: number, leftDir: boolean) => void
    scrollVertical: (top: number, topDir: boolean) => void
    sheetAdded: (sheet: SpreadsheetComponent) => void
    sheetLoaded: (sheet: SpreadsheetComponent) => void
    sheetRemoved: (sheet: SpreadsheetComponent) => void
    sheetUpdated: (sheet: SpreadsheetComponent) => void
    tableBuilding: () => void
    tableBuilt: () => void
    tableDestroyed: () => void
    TooltipClosed: (cell: CellComponent) => void
    TooltipOpened: (cell: CellComponent) => void
    validationFailed: (
        cell: CellComponent,
        value: any,
        validators: Validator[],
    ) => void