Interface DataTableCollection

Bag of data tables.

To access the items you can use for...of:

const dataTables = ...;
for (const dataTable of dataTables) {
...
}

If you need an array use the tables property

const dataTables = ...;
const tables = dataTables.tables;

Use the size property to check how many data tables are available.

const dataTables = ...;
const size = dataTables.size;

Use getFirstSelectedTable to access the first selected data table (the one shown in the result-ui).

const dataTables = ...;
const dataTable = dataTables.getFirstSelectedTable();

You can watch the events changed, selection-changed and destroyed.

const dataTables = ...;
dataTables.on("changed",({added, deleted, updated})=> { ... });
dataTables.on("selection-changed",({added, deleted, updated})=> { ... });
dataTables.on("destroyed",()=> { ... });
interface DataTableCollection {
    add(value): this;
    clearTableSelection(): void;
    clickTable(id): void;
    deleteAndDestroyById(id): undefined | DataTable;
    deleteById(id): undefined | DataTable;
    deselectTables(ids): void;
    destroy(): void;
    focusTable(id): void;
    getById(id): undefined | DataTable;
    getFirstSelectedTable(): undefined | DataTable;
    getFirstSelectedTableId(): undefined | string;
    getSelectedTableIds(): Iterable<string>;
    getSelectedTables(): Iterable<DataTable>;
    getSelectedTablesCount(): number;
    hasId(id): boolean;
    hasSelectedTables(): boolean;
    isSelectedTable(id): boolean;
    on<Name>(name, callBack): Handle;
    selectTables(ids, selected?): void;
    size: number;
    tables: readonly DataTable[];
}

Hierarchy

Properties

size: number

Amount of data tables.

tables: readonly DataTable[]

Provides access to an array representation of the tables. Equivalent to Array.from(tableCollection). A change to the array is not reflected in the collection.

Methods

  • Appends a new data table.

    Parameters

    Returns this

  • Clears the selection. Note: A new table will be selected automatically, a tick later.

    Returns void

  • Emits event 'data-table-clicked'.

    Parameters

    • id: string

      id of data table

    Returns void

  • Delete data table by id and destroys it.

    Parameters

    • id: string

    Returns undefined | DataTable

  • Delete data table by id

    Parameters

    • id: string

    Returns undefined | DataTable

  • Removes all table ids from the selection.

    Parameters

    • ids: Iterable<string>

      iterable of ids.

    Returns void

  • Destroy instance. Delegates destruction to all data tables.

    Returns void

  • Emits event 'data-table-focus-changed'.

    Parameters

    • id: undefined | string

      id of data table

    Returns void

  • Lookup data table by id

    Parameters

    • id: string

    Returns undefined | DataTable

  • Provides access to the first selected data table, if one is available.

    Returns undefined | DataTable

  • Provides access to the first selected data table, if one is available.

    Returns undefined | string

  • Provides access to all selected ids.

    Returns Iterable<string>

  • Provides a way to get all selected items.

    Returns Iterable<DataTable>

  • Amount of selected items.

    Returns number

  • Test if data table with id is contained.

    Parameters

    • id: string

    Returns boolean

  • true = selected tables available. false = no tables selected.

    Returns boolean

  • Parameters

    • id: string

    Returns boolean

    a boolean indicating whether the given id is selected.

  • Adds all table ids to the selection.

    Parameters

    • ids: Iterable<string>

      iterable of ids.

    • Optional selected: boolean

      true = select, false = deselect. If omitted true is assumed.

    Returns void

Generated using TypeDoc