Skip to main content

@react-querybuilder/dnd

Components

FunctionDescription
InlineCombinatorDnDThe drag-and-drop-enabled inline combinator component.
QueryBuilderDnDContext provider to enable drag-and-drop. If the application already implements react-dnd, use QueryBuilderDndWithoutProvider instead.
QueryBuilderDndWithoutProviderContext provider to enable drag-and-drop. Only use this provider if the application already implements react-dnd, otherwise use QueryBuilderDnD.
RuleDnDRule component for drag-and-drop. Renders the provided rule component (Rule by default), but forwards the drag-and-drop context.
RuleGroupDnDRule group component for drag-and-drop. Renders the provided rule group component (RuleGroup by default), but forwards the drag-and-drop context so that child rules and groups will render within the appropriate drag-and-drop wrappers.

Props

NameDescription
QueryBuilderDndContextPropsQueryBuilderDndContext props.
DndPropType of the dnd prop on QueryBuilderDnD/QueryBuilderDndWithoutProvider.
QueryBuilderDndPropsQueryBuilderDnD props.

Hooks

NameDescription
UseReactDnDCombination of all exports from react-dnd and the backends from react-dnd-html5-backend and react-dnd-touch-backend.
useInlineCombinatorDnD-
useReactDnD-
useRuleDnD-
useRuleGroupDnD-

Interfaces

InterfaceDescription
CustomCanDropParamsParameters passed to custom canDrop functions.

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.