Class TableViewportSubscription

This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you retain an instance of this, you have two choices - either only use it to call close() on it to stop the table's viewport without creating a new one, or listen directly to this object instead of the table for data events, and always call close() when finished. Calling any method on this object other than close() will result in it continuing to live on after setViewport is called on the original table, or after the table is modified.

Hierarchy

  • TableViewportSubscription

Implements

  • HasEventHandling

Constructors

Methods

  • Listen for events on this object.

    Type Parameters

    • T

      the type of the data that the event will provide

    Parameters

    • name: string

      the name of the event to listen for

    • callback: ((e) => void)

      a function to call when the event occurs

        • (e): void
        • Parameters

          Returns void

    Returns (() => void)

    Returns a cleanup function.

      • (): void
      • Listen for events on this object.

        Returns void

        Returns a cleanup function.

  • Stops this viewport from running, stopping all events on itself and on the table that created it.

    Returns void

  • Gets the data currently visible in this viewport

    Returns Promise<ViewportData>

    Promise of TableData.

  • Parameters

    • name: string

    Returns boolean

  • Type Parameters

    • T

    Parameters

    • eventName: string
    • Optional timeoutInMillis: number

    Returns Promise<any>

  • Removes an event listener added to this table.

    Type Parameters

    • T

    Parameters

    • name: string
    • callback: ((e) => void)
        • (e): void
        • Parameters

          Returns void

    Returns boolean

  • Changes the rows and columns set on this viewport. This cannot be used to change the update interval.

    Parameters

    • firstRow: number
    • lastRow: number
    • Optional columns: Column[]
    • Optional updateIntervalMs: number
    • Optional isReverseViewport: boolean

    Returns void

  • Parameters

    Returns Promise<TableData>