Interface ViewportData

All Superinterfaces:
TableData
All Known Implementing Classes:
AbstractTableSubscription.SubscriptionEventData, AbstractTableSubscription.ViewportEventData

@JsType(namespace="dh") public interface ViewportData extends TableData
Extends TableData, but only contains data in the current viewport. The only API change from TableData is that ViewportData also contains the offset to this data, so that the actual row number may be determined.

For viewport subscriptions, it is not necessary to read with the key, only with the position.

Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier scrolling without going to the server.

  • Method Details

    • getOffset

      @JsProperty double getOffset()
      The position of the first returned row within the table.
    • getRows

      @JsProperty elemental2.core.JsArray<@TsTypeRef(ViewportRow.class) TableData.Row> getRows()
      Description copied from interface: TableData
      A lazily computed array of all rows available on the client.
      Specified by:
      getRows in interface TableData
    • get

      Reads a row object from the viewport, based on its position in the table.
      Specified by:
      get in interface TableData
      Parameters:
      index - the position or key to access
      Returns:
      the row at the given location