Skip to main content

DndAdapter

Defined in: dnd/src/adapter.ts:142

The DnD adapter interface. Implementations of this interface provide drag-and-drop functionality for react-querybuilder using a specific DnD library.

Built-in adapters: createReactDnDAdapter (for react-dnd) and createDndKitAdapter (for @dnd-kit/core).

Properties

DndProvider

DndProvider: ComponentType<DndAdapterProviderProps>

Defined in: dnd/src/adapter.ts:147

Provider component that wraps the query builder tree with the DnD library's context.


useInlineCombinatorDnD

useInlineCombinatorDnD: (params: DndAdapterInlineCombinatorDnDParams) => AdapterUseInlineCombinatorDnDResult

Defined in: dnd/src/adapter.ts:165

Hook providing drop-target behavior for an inline combinator. Returns a drop ref and hover state.

Parameters

ParameterType
paramsDndAdapterInlineCombinatorDnDParams

Returns

AdapterUseInlineCombinatorDnDResult


useRuleDnD

useRuleDnD: (params: DndAdapterRuleDnDParams) => AdapterUseRuleDnDResult

Defined in: dnd/src/adapter.ts:153

Hook providing drag-and-drop behavior for a rule component. Returns refs and state to attach to the rule's DOM elements.

Parameters

ParameterType
paramsDndAdapterRuleDnDParams

Returns

AdapterUseRuleDnDResult


useRuleGroupDnD

useRuleGroupDnD: (params: DndAdapterRuleGroupDnDParams) => AdapterUseRuleGroupDnDResult

Defined in: dnd/src/adapter.ts:159

Hook providing drag-and-drop behavior for a rule group component. Returns refs and state to attach to the group's DOM elements.

Parameters

ParameterType
paramsDndAdapterRuleGroupDnDParams

Returns

AdapterUseRuleGroupDnDResult


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.