React Common Types - grids - DragReorderInfo

Describes the drop location and asynchronous completion of a row reorder operation.

import { DragReorderInfo } from "devextreme/common/grids"
Type:

Object

This type supplies the dropInsideItem and promise fields for DataGrid and TreeList RowDraggingReorderEvent arguments. Use these fields to update the TreeList hierarchy or wait for an asynchronous data source update.

dropInsideItem

Indicates whether the dragged row is dropped inside another row.

Type:

Boolean

Use this field in TreeList row-dragging handlers to determine whether to update the row's parent. A value of true indicates a drop inside the target row. A value of false indicates a drop between rows. To allow drops inside rows, enable allowDropInsideItem. This field applies only to TreeList.

promise

Assign a Promise to this field to complete a row reorder operation asynchronously.

Type:

PromiseLike object (jQuery, native, etc)

Assign the Promise returned by your data source update to e.promise in the onReorder handler. The Promise should resolve after the update completes.

View Demo