ManualRowMove
Methods
destroy
manualRowMove.destroy()
Destroys the plugin instance.
disablePlugin
manualRowMove.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
dragRow
manualRowMove.dragRow(row, dropIndex) ⇒ boolean
Drag a single row to drop index position.
Emits: Hooks#event:beforeRowMove, Hooks#event:afterRowMove
| Param | Type | Description |
|---|---|---|
| row | number | Visual row index to be dragged. |
| dropIndex | number | Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. |
dragRows
manualRowMove.dragRows(rows, dropIndex) ⇒ boolean
Drag multiple rows to drop index position.
Emits: Hooks#event:beforeRowMove, Hooks#event:afterRowMove
| Param | Type | Description |
|---|---|---|
| rows | Array | Array of visual row indexes to be dragged. |
| dropIndex | number | Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. |
enablePlugin
manualRowMove.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
isEnabled
manualRowMove.isEnabled() ⇒ boolean
Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit
hook and if it returns true then the ManualRowMove#enablePlugin method is called.
When [[Options#dataProvider]] is a complete server-backed configuration, the DataProvider plugin blocks this plugin from enabling.
isMovePossible
manualRowMove.isMovePossible(movedRows, finalIndex) ⇒ boolean
Indicates if it’s possible to move rows to the desired position. Some of the actions aren’t possible, i.e. You can’t move more than one element to the last position.
| Param | Type | Description |
|---|---|---|
| movedRows | Array | Array of visual row indexes to be moved. |
| finalIndex | number | Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action. To check the visualization of the final index, please take a look at documentation. |
moveRow
manualRowMove.moveRow(row, finalIndex) ⇒ boolean
Moves a single row.
To see the outcome, rerender your grid by calling render().
Emits: Hooks#event:beforeRowMove, Hooks#event:afterRowMove
| Param | Type | Description |
|---|---|---|
| row | number | Visual row index to be moved. |
| finalIndex | number | Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action. To check the visualization of the final index, please take a look at documentation. |
moveRows
manualRowMove.moveRows(rows, finalIndex) ⇒ boolean
Moves multiple rows.
To see the outcome, rerender your grid by calling render().
Emits: Hooks#event:beforeRowMove, Hooks#event:afterRowMove
| Param | Type | Description |
|---|---|---|
| rows | Array | Array of visual row indexes to be moved. |
| finalIndex | number | Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action. To check the visualization of the final index, please take a look at documentation. |
updatePlugin
manualRowMove.updatePlugin()
Updates the plugin’s state.
This method is executed when updateSettings() is invoked with any of the following configuration options: