Skip to main content

GridTrackReorderOptions

GridTrackReorderOptions

fromIndices: ReadonlyArray<number>

The indices of the rows or columns (tracks) to move. Does not need to be sorted, contiguous, or deduplicated. All indices must be within bounds for the current number of rows or columns.


insertionIndex: number

The index to insert the selected rows or columns (tracks) at. This is evaluated against the original row/column order (before the move).

As an example, take a grid with 4 columns and 2 rows. fromIndices could be 0 to 3 (inclusive), and insertionIndex could be 0 to 4 (inclusive).

  0         1         2         3         4 ← possible insertion indices
---- 0 --- --- 1 --- --- 2 --- --- 3 ---- ← track indices
+-------------------+---------+---------+
| | | |
| | | |
+---------+---------+---------+---------+
| | | | |
| | | | |
+---------+---------+---------+---------+