Skip to main content

QueryBuilderDndContextProps

Defined in: packages/dnd/src/types.ts:85

QueryBuilderDndContext props.

Extends

  • Pick<QueryBuilderDndProps, "canDrop" | "copyModeModifierKey" | "groupModeModifierKey" | "hideDefaultDragPreview">

Properties

baseControls

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

Defined in: packages/dnd/src/types.ts:92


canDrop()?

optional canDrop: (params: CustomCanDropParams) => boolean

Defined in: packages/dnd/src/types.ts:59

Parameters

ParameterType
paramsCustomCanDropParams

Returns

boolean

Inherited from

Pick.canDrop


copyModeModifierKey?

optional copyModeModifierKey: string

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

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


groupModeModifierKey?

optional groupModeModifierKey: string

Defined in: packages/dnd/src/types.ts:73

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: packages/dnd/src/types.ts:77

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

Inherited from

QueryBuilderDndProps.hideDefaultDragPreview


useDrag()?

optional useDrag: <DragObject, DropResult, CollectedProps>(specArg: FactoryOrInstance<DragSourceHookSpec<DragObject, DropResult, CollectedProps>>, deps?: unknown[]) => [CollectedProps, ConnectDragSource, ConnectDragPreview]

Defined in: packages/dnd/src/types.ts:90

useDragSource hook

Type Parameters

Type ParameterDefault type
DragObjectunknown
DropResultunknown
CollectedPropsunknown

Parameters

ParameterTypeDescription
specArgFactoryOrInstance<DragSourceHookSpec<DragObject, DropResult, CollectedProps>>-
deps?unknown[]The memoization deps array to use when evaluating spec changes

Returns

[CollectedProps, ConnectDragSource, ConnectDragPreview]


useDrop()?

optional useDrop: <DragObject, DropResult, CollectedProps>(specArg: FactoryOrInstance<DropTargetHookSpec<DragObject, DropResult, CollectedProps>>, deps?: unknown[]) => [CollectedProps, ConnectDropTarget]

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

useDropTarget Hook

Type Parameters

Type ParameterDefault type
DragObjectunknown
DropResultunknown
CollectedPropsunknown

Parameters

ParameterTypeDescription
specArgFactoryOrInstance<DropTargetHookSpec<DragObject, DropResult, CollectedProps>>-
deps?unknown[]The memoization deps array to use when evaluating spec changes

Returns

[CollectedProps, ConnectDropTarget]


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.