Table plugins are stateless objects that optionally provide hooks based on what the plugin wishes to modify.

If state is desired, Metadata classes may be provided to manage that state. As a convenience, when the meta classes are instantiated, they'll be given the same owner as everything else in the application, so service injection will be available within the meta class instances.

A plugin can provide components that the consuming Table can opt in to rendering. (though, often these components will be required to be rendered for the plugin to work)

a Plugin has one type argument:

  • Signature - which can provide optional information about the Meta/State and Options the plugin can take

    Any particular plugin instantiation will have at most 1 instance of their TableMeta and n instances of their ColumnMeta, where n is at most the number of columns.

Hierarchy

Implements

Constructors

Properties

[___Signature__]: Signature

(secret)

Because classes are kind of like interfaces, we need "something" to help TS know what a Resource is.

This isn't a real API, but does help with type inference with the SignatureFrom utility above

meta: {
    column: typeof ColumnMeta;
    table: typeof TableMeta;
} = ...

Optional state that this plugin may or may not choose to use

columns will each have an instance of meta.column. the table will have only one instance of meta.table.

Type declaration

name: string = 'column-visibility'

Unique name for the plugin.

  • only one plugin of the same name is allowed
  • the name is used for storing preferences / serializable information
table: Table<unknown>
features: string[] = ...
requires?: string[]

Methods

Generated using TypeDoc