Skip to main content

QueryBuilderDndContextProps

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

QueryBuilderDndContext props.

Extends

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

Properties

adapter?

optional adapter?: DndAdapter

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


baseControls

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

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


canDrop?

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

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

Parameters

ParameterType
paramsCustomCanDropParams

Returns

boolean

Inherited from

Pick.canDrop


copyModeAfterHoverMs?

optional copyModeAfterHoverMs?: number

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

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:73

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:90

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:85

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:94

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

Inherited from

QueryBuilderDndProps.hideDefaultDragPreview


onDragMove?

optional onDragMove?: OnDragMoveCallback

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

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


updateWhileDragging?

optional updateWhileDragging?: boolean

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

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.