Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TableType<TRow, TSource, TFiltered, TSorted, TPaged>

Defines a type of Datatable, with its Settings object.

Type parameters

  • TRow: __type

  • TSource

  • TFiltered

  • TSorted

  • TPaged

Hierarchy

  • TableType

Index

Constructors

constructor

  • new TableType(id: string, handler?: IHandler<TRow, TSource, TFiltered, TSorted, TPaged>): TableType
  • Creates a new datatable type, instanciating a new Settings object.

    Parameters

    • id: string

      The identifier of this datatable type

    • Default value handler: IHandler<TRow, TSource, TFiltered, TSorted, TPaged> = new DefaultHandler<TRow>() as any

      Transformation functions to use for table operations

    Returns TableType

Properties

handler

handler: IHandler<TRow, TSource, TFiltered, TSorted, TPaged>

Transformation functions to use for table operations

id

id: string

The identifier of this datatable type

setDisplayHandler

setDisplayHandler: function = ( this.setHandler as any ).bind( this, 'display' ) as ( closure: TDisplayHandler<TRow, TSource, TFiltered, TSorted, TPaged> ) => this

Defines the function used to paginate data

see

Handler#displayHandler

tutorial

Ajax table (with handler customization)

param

The function to use to post-process processed steps & extract rows & total count.

returns

this for chaining.

Type declaration

    • (closure: TDisplayHandler<TRow, TSource, TFiltered, TSorted, TPaged>): this
    • Parameters

      Returns this

setFilterHandler

setFilterHandler: function = ( this.setHandler as any ).bind( this, 'filter' ) as ( closure: TFilterHandler<TRow, TSource, TFiltered> ) => this

Defines the function used to filter data

see

Handler#filterHandler

tutorial

Ajax table (with handler customization)

param

The function to use for sorting.

returns

this for chaining.

Type declaration

setPaginateHandler

setPaginateHandler: function = ( this.setHandler as any ).bind( this, 'paginate' ) as ( closure: TPaginateHandler<TRow, TSorted, TPaged> ) => this

Defines the function used to paginate data

see

Handler#paginateHandler

tutorial

Ajax table (with handler customization)

param

The function to use for pagination.

returns

this for chaining.

Type declaration

setSortHandler

setSortHandler: function = ( this.setHandler as any ).bind( this, 'sort' ) as ( closure: TSortHandler<TRow, TFiltered, TSorted> ) => this

Defines the function used to sort data

see

Handler#sortHandler

tutorial

Ajax table (with handler customization)

param

The function to use for sorting.

returns

this for chaining.

Type declaration

    • Parameters

      Returns this

settings

settings: Settings = new Settings()

Settings object used to get various values for the datatable & other components

Accessors

tableTypeConsumer

  • get tableTypeConsumer(): VueConstructor<Vue> & object

Methods

getPagerDefinition

getTableDefinition

mergeSettings

Private setHandler

  • setHandler(type: "filter", closure: TFilterHandler<TRow, TSource, TFiltered>): this
  • setHandler(type: "sort", closure: TSortHandler<TRow, TFiltered, TSorted>): this
  • setHandler(type: "paginate", closure: TPaginateHandler<TRow, TSorted, TPaged>): this
  • setHandler(type: "display", closure: TDisplayHandler<TRow, TSource, TFiltered, TSorted, TPaged>): this
  • Override the table type's handler method with the provided one. It can be used to override a single handler step, or to change the behavior of a table type at runtime.

    Parameters

    • type: "filter"

      The type of the handler ('filter' | 'sort' | 'paginate' | 'display')

    • closure: TFilterHandler<TRow, TSource, TFiltered>

      The new handler to set.

    Returns this

  • Parameters

    • type: "sort"
    • closure: TSortHandler<TRow, TFiltered, TSorted>

    Returns this

  • Parameters

    Returns this

  • Parameters

    • type: "display"
    • closure: TDisplayHandler<TRow, TSource, TFiltered, TSorted, TPaged>

    Returns this

setting

  • setting(path: Path, value: any): this
  • setting(path: Path): any
  • Set a Settings value at a specific path.

    Parameters

    • path: Path

      Path to the setting value to set.

    • value: any

      Value to set at the specified path.

    Returns this

    this for chaining.

  • Get a Settings value at a specific path.

    Parameters

    • path: Path

      Path to the setting value to get.

    Returns any

    the value at the given path.

Generated using TypeDoc