DragPreviewContextValue
Defined in: dnd/src/DragPreviewContext.ts:11
Context value for the drag preview state during update-while-dragging.
Properties
cancelDrag
cancelDrag: () =>
void
Defined in: dnd/src/DragPreviewContext.ts:32
Discard the shadow query and revert to the original query. Called on cancel.
Returns
void
commitDrag
commitDrag: () =>
void
Defined in: dnd/src/DragPreviewContext.ts:27
Commit the current shadow query as the real query and clear preview state. Called on drop.
Returns
void
dragPreviewState
dragPreviewState:
DragPreviewState|null
Defined in: dnd/src/DragPreviewContext.ts:13
Current drag preview state, or null when not actively dragging.
updatePreviewPosition
updatePreviewPosition: (
targetPath:Path,targetType:DndDropTargetType,quadrant:"upper"|"lower") =>void
Defined in: dnd/src/DragPreviewContext.ts:18
Update the preview position. Called by adapter hooks when the cursor enters a new quadrant of a rule or group.
Parameters
| Parameter | Type |
|---|---|
targetPath | Path |
targetType | DndDropTargetType |
quadrant | "upper" | "lower" |
Returns
void
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.