Skip to main content

createDndKitAdapter()

createDndKitAdapter(dndKitExports: DndKitExports): DndAdapter

Defined in: dnd/src/adapters/dnd-kit.tsx:149

Creates a DndAdapter backed by @dnd-kit/core.

The adapter uses setActivatorNodeRef for drag handles, so sensor listeners are automatically attached to the correct element without imperative DOM manipulation.

Parameters

ParameterType
dndKitExportsDndKitExports

Returns

DndAdapter

Example

import { QueryBuilderDnD } from '@react-querybuilder/dnd';
import { createDndKitAdapter } from '@react-querybuilder/dnd/dnd-kit';
import * as DndKit from '@dnd-kit/core';

const adapter = createDndKitAdapter(DndKit);

<QueryBuilderDnD dnd={adapter}>
<QueryBuilder />
</QueryBuilderDnD>

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.