How to use the @blueprintjs/table.Utils.reorderArray function in @blueprintjs/table

To help you get started, we’ve selected a few @blueprintjs/table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arkhn / pyrog / client / src / views / Mapping / components / TabColumnPicking / components / TableViewer / index.tsx View on Github external
const handleColumnsReordered = (
    oldIndex: number,
    newIndex: number,
    length: number
  ) => {
    if (oldIndex === newIndex) {
      return;
    }
    const nextChildren = Utils.reorderArray(
      columns,
      oldIndex,
      newIndex,
      length
    );
    setColumns(nextChildren);
  };
github palantir / blueprint / packages / docs-app / src / examples / table-examples / tableReorderableExample.tsx View on Github external
private handleColumnsReordered = (oldIndex: number, newIndex: number, length: number) => {
        if (oldIndex === newIndex) {
            return;
        }
        const nextChildren = Utils.reorderArray(this.state.columns, oldIndex, newIndex, length);
        this.setState({ columns: nextChildren });
    };
github palantir / blueprint / packages / docs-app / src / examples / table-examples / tableReorderableExample.tsx View on Github external
private handleRowsReordered = (oldIndex: number, newIndex: number, length: number) => {
        if (oldIndex === newIndex) {
            return;
        }
        this.setState({ data: Utils.reorderArray(this.state.data, oldIndex, newIndex, length) });
    };
}