Skip to main content

QueryBuilderDndContextProps

Defined in: dnd/src/types.ts:196

QueryBuilderDndContext props.

Extends​

  • Pick<QueryBuilderDndProps, "canDrop" | "copyModeModifierKey" | "copyModeAfterHoverMs" | "groupModeModifierKey" | "groupModeAfterHoverMs" | "hideDefaultDragPreview" | "updateWhileDragging" | "onDragMove" | "onRuleDrop">

Properties​

adapter?​

optional adapter?: DndAdapter

Defined in: dnd/src/types.ts:208


baseControls​

baseControls: Pick<Controls<FullField, string>, "rule" | "ruleGroup" | "combinatorSelector">

Defined in: dnd/src/types.ts:209


canDrop?​

optional canDrop?: (params: CustomCanDropParams) => boolean

Defined in: dnd/src/types.ts:63

Parameters​

ParameterType
paramsCustomCanDropParams

Returns​

boolean

Inherited from​

Pick.canDrop


copyModeAfterHoverMs?​

optional copyModeAfterHoverMs?: number

Defined in: dnd/src/types.ts:75

Milliseconds after hovering a drop target before the drop effect automatically switches to "copy". Set to undefined or 0 to disable.

Inherited from​

QueryBuilderDndProps.copyModeAfterHoverMs


copyModeModifierKey?​

optional copyModeModifierKey?: string

Defined in: dnd/src/types.ts:70

Key code for the modifier key that puts a drag-and-drop action in "copy" mode. Can be combined with "group" modifier key.

Default​

"alt"

Inherited from​

QueryBuilderDndProps.copyModeModifierKey


groupModeAfterHoverMs?​

optional groupModeAfterHoverMs?: number

Defined in: dnd/src/types.ts:87

Milliseconds after hovering a drop target before the drop will automatically create a new group. Set to undefined or 0 to disable.

Inherited from​

QueryBuilderDndProps.groupModeAfterHoverMs


groupModeModifierKey?​

optional groupModeModifierKey?: string

Defined in: dnd/src/types.ts:82

Key code for the modifier key that puts a drag-and-drop action in "group" mode. Can be combined with "copy" modifier key.

Default​

"ctrl"

Inherited from​

QueryBuilderDndProps.groupModeModifierKey


hideDefaultDragPreview?​

optional hideDefaultDragPreview?: boolean

Defined in: dnd/src/types.ts:91

Do not render the "ghost" preview image when dragging.

Inherited from​

QueryBuilderDndProps.hideDefaultDragPreview


onDragMove?​

optional onDragMove?: OnDragMoveCallback

Defined in: dnd/src/types.ts:107

Callback invoked on each drag position change when updateWhileDragging is enabled. Receives the dragged item, the shadow query representing the prospective layout, and the preview path of the dragged item.

Inherited from​

QueryBuilderDndProps.onDragMove


onRuleDrop?​

optional onRuleDrop?: OnRuleDropCallback

Defined in: dnd/src/types.ts:112

Callback invoked after a drag-and-drop operation completes. Receives info about the dragged item, source/target paths, and drop effect.

Inherited from​

QueryBuilderDndProps.onRuleDrop


updateWhileDragging?​

optional updateWhileDragging?: boolean

Defined in: dnd/src/types.ts:101

Enable visual rearrangement of the query tree during drag. When enabled, rules and groups visually move to their prospective positions as the user drags, instead of only showing a drop indicator line.

onQueryChange is only fired on drop, not during intermediate movements.

Default​

false

Inherited from​

QueryBuilderDndProps.updateWhileDragging


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.