computeShadowQuery()
computeShadowQuery(
__namedParameters: {draggedItem:DraggedItem;draggedPath:Path;dropEffect:DropEffect;groupItems:boolean;originalQuery:RuleGroupTypeAny;quadrant:"upper"|"lower";targetPath:Path;targetType:DndDropTargetType; }): {previewPath:Path;shadowQuery:RuleGroupTypeAny; } |null
Defined in: dnd/src/shadowQuery.ts:73
Computes a shadow query given the current drag state and target position.
Uses the existing move() and group() utilities from @react-querybuilder/core
to produce an immutable preview of the query with the dragged item at its
prospective position.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { draggedItem: DraggedItem; draggedPath: Path; dropEffect: DropEffect; groupItems: boolean; originalQuery: RuleGroupTypeAny; quadrant: "upper" | "lower"; targetPath: Path; targetType: DndDropTargetType; } |
__namedParameters.draggedItem | DraggedItem |
__namedParameters.draggedPath | Path |
__namedParameters.dropEffect | DropEffect |
__namedParameters.groupItems | boolean |
__namedParameters.originalQuery | RuleGroupTypeAny |
__namedParameters.quadrant | "upper" | "lower" |
__namedParameters.targetPath | Path |
__namedParameters.targetType | DndDropTargetType |
Returns
{ previewPath: Path; shadowQuery: RuleGroupTypeAny; } | null
The shadow query and the path where the dragged item now lives,
or null if the move would be a no-op.
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.