1.6.0 • Published 1 month ago

@types/datatables.net-colreorder v1.6.0

Weekly downloads
2,304
License
MIT
Repository
-
Last release
1 month ago

Installation

npm install --save @types/datatables.net-colreorder

Summary

This package contains type definitions for datatables.net-colReorder (https://datatables.net/extensions/colreorder/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/datatables.net-colreorder.

index.d.ts

// Type definitions for datatables.net-colReorder 1.4
// Project: https://datatables.net/extensions/colreorder/, https://datatables.net
// Definitions by: Andy Ma <https://github.com/andy-maca>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

/// <reference types="jquery" />
/// <reference types="datatables.net"/>

declare namespace DataTables {
  interface Settings {
    /*
     * colReorder extension options
     */
    colReorder?: boolean | ColReorderSettings | undefined;
  }

  interface ColReorderSettings {
    /*
     * Number of columns (counting from the left) to disallow reordering of, '0' in default
     */
    fixedColumnsLeft?: number | undefined;

    /*
     * Number of columns (counting from the right) to disallow reordering of, '0' in default
     */
    fixedColumnsRight?: number | undefined;

    /*
     * Set a default order for the columns in the table
     */
    order?: number[] | undefined;

    /*
     * Enable / disable live reordering of columns during a drag, 'true' in default
     */
    realtime?: boolean | undefined;
    /*
     * Callback after reorder
     */
    reorderCallback: () => void;
  }

  interface Api {
    colReorder: {
      /*
      * Programmatically reorder columns
      */
      move(from: number, to: number, drop: boolean, invalidate: boolean): Api;
      /*
      * Get / set column order
      */
      order(newOrder?: number[], originalIndexes?: boolean): Api;
      /*
      * Restore the loaded column order
      */
      reset(): Api;
      /*
      * Convert one or more column indexes to and from current and original indexes
      */
      transpose(idx?: number | number[], direction?: "toCurrent" | "toOriginal" | "fromOriginal" | "fromCurrent"): Api;
    };
  }
}

Additional Details

Credits

These definitions were written by Andy Ma.

1.6.0

1 month ago

1.4.5

6 months ago

1.4.4

7 months ago

1.4.3

8 months ago

1.4.2

3 years ago

1.4.1

5 years ago

1.4.0

6 years ago