One instance of a plugin exists per table but a plugin can have a "Meta" for each column

Hierarchy

Implements

Constructors

Properties

containerModifier: ((element: HTMLElement, table: Table<unknown>) => (() => void)) = resizeObserver

Type declaration

    • (element: HTMLElement, table: Table<unknown>): (() => void)
    • Private

      included in the same file as the plugin due to circular dependency

      This goes on the containing element

      Example

       <div {{resizeObserver @table}}>
      <table>

      Parameters

      • element: HTMLElement
      • table: Table<unknown>

      Returns (() => void)

        • (): void
        • Returns void

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-resizing'

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[]

Accessors

  • get options(): undefined | Options
  • Utility property that returns the resulting options passed during table creation for this specific plugin.

    Returns undefined | Options

Methods

  • Kind

    Column property

    Specify a modifier setup/teardown function to attach to each of the header cells

    Can be used to add / remove attributes, event listeners, etc

    Parameters

    Returns void

  • Helper for specifying column-level configurations for a plugin on headlessTable's columns option

    Type Parameters

    • T extends BasePlugin<unknown, unknown, unknown, unknown, T>

    Parameters

    • this: Constructor<T, any[]>
    • configFn: (() => ReturnType<InstanceOf<T>["getColumnOptions"]>)
        • (): ReturnType<InstanceOf<T>["getColumnOptions"]>
        • Returns ReturnType<InstanceOf<T>["getColumnOptions"]>

    Returns [Constructor<T, any[]>, (() => ReturnType<InstanceOf<T>["getColumnOptions"]>)]

  • Helper for specifying plugins on headlessTable with the plugin-level options

    Type Parameters

    • T extends BasePlugin<unknown, unknown, unknown, unknown, T>

    Parameters

    • this: Constructor<T, any[]>
    • configFn: (() => OptionsFor<T>)
        • (): OptionsFor<T>
        • Returns OptionsFor<T>

    Returns [Constructor<T, any[]>, (() => OptionsFor<T>)]

Generated using TypeDoc