An object of this kind lives only for the time a concrete UI is displayed. It provides a way to react to action state changes, e.g. when an action is hidden or deactivated. Additionally, it provides a way to conditionally render row actions.

interface TableActionResolverContext {
    destroy(): void;
    getBulkActions(
        dataTable: DataTable,
    ): TableActionItem<BulkButtonTableAction>[];
    getRowActions(
        dataTable: DataTable,
        rowItem: TableItem,
    ): TableActionItem<RowButtonTableAction>[];
    on<Name extends EventNames<TableActionResolverContextEvents>>(
        eventName: Name,
        callback: EventCallback<TableActionResolverContextEvents[Name]>,
    ): EventHandle;
    on(eventName: "*", callback: EventCallback<void>): EventHandle;
    on(
        eventName: string | string[],
        callback: EventCallback<unknown>,
    ): EventHandle;
}

Hierarchy (View Summary)

Methods

  • Must be called by a UI to indicate that the context is no longer required.

    Returns void