Plugin/Reorderable
A plugin to make Table's columns and rows reorderable
Example
JS
import { reorderable } from 'komps/plugins'
Table.include(reorderable)
new Table({
reorder: ['columns'],
data: [...],
columns: [...]
})Parameters
options
:
Object
optionalOptions added to the Table
reorder
:
boolean
|
string
optionalEnable ability to reorder rows and columns. Pass "rows" or "columns" to reorder just one axis.
Events
Fired after a column reorder finishes
Properties
fromIndex
:
number
original column index
toIndex
:
number
new column index
Fired after a row reorder finishes
Properties
fromIndex
:
number
original row index
toIndex
:
number
new row index