Used for keeping track of and updating column order

Hierarchy

  • ColumnOrder

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • args: {
          columns: (() => Column<unknown>[]);
          existingOrder?: Map<string, number>;
          save?: ((order: Map<string, number>) => void);
      }
      • columns: (() => Column<unknown>[])
      • Optional existingOrder?: Map<string, number>
      • Optional save?: ((order: Map<string, number>) => void)
          • (order: Map<string, number>): void
          • Parameters

            • order: Map<string, number>

            Returns void

    Returns ColumnOrder

Properties

args: {
    columns: (() => Column<unknown>[]);
    existingOrder?: Map<string, number>;
    save?: ((order: Map<string, number>) => void);
}

Type declaration

  • columns: (() => Column<unknown>[])
  • Optional existingOrder?: Map<string, number>
  • Optional save?: ((order: Map<string, number>) => void)
      • (order: Map<string, number>): void
      • Parameters

        • order: Map<string, number>

        Returns void

map: TrackedMap<string, number> = ...

This map will be empty until we re-order something.

Accessors

Methods

  • To account for columnVisibilty, we need to:

    • get the list of visible columns
    • get the column order (which preserves the order of hidden columns)
    • skip over non-visible columns when determining the previous "index"
    • set the position to whatever that is.

    Parameters

    • key: string

    Returns void

  • To account for columnVisibilty, we need to:

    • get the list of visible columns
    • get the column order (which preserves the order of hidden columns)
    • skip over non-visible columns when determining the next "index"
    • set the position to whatever that is.

    Parameters

    • key: string

    Returns void

Generated using TypeDoc