Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions api-documentation/context-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ interface Props {
cancelDrop?: CancelDrop;
children?: React.ReactNode;
collisionDetection?: CollisionDetection;
layoutMeasuring?: Partial<LayoutMeasuring>;
measuring?: MeasuringConfiguration;
modifiers?: Modifiers;
screenReaderInstructions?: ScreenReaderInstructions;
sensors?: SensorDescriptor<any>[];
Expand Down Expand Up @@ -203,23 +203,23 @@ To learn more about how to use Modifiers, read the Modifiers guide:

### Layout measuring

You can configure when and how often `DndContext` should measure its droppable elements by using the `layoutMeasuring` prop.
You can configure when and how often `DndContext` should measure its droppable elements by using the `measuring` prop.

The `frequency` argument controls how frequently layouts should be measured. By default, layout measuring is set to `optimized`, which only measures layouts based on the `strategy`.

Specify one of the following strategies:

* `LayoutMeasuringStrategy.WhileDragging`: Default behavior, only measure droppable elements right after dragging has begun.
* `MeasuringStrategy.WhileDragging`: Default behavior, only measure droppable elements right after dragging has begun.

`LayoutMeasuringStrategy.BeforeDragging`: Measure droppable elements before dragging begins and right after it ends.
`MeasuringStrategy.BeforeDragging`: Measure droppable elements before dragging begins and right after it ends.

* `LayoutMeasuringStrategy.Always`: Measure droppable elements before dragging begins, right after dragging has begun, and after it ends.
* `MeasuringStrategy.Always`: Measure droppable elements before dragging begins, right after dragging has begun, and after it ends.

Example usage:

```jsx
import {DndContext, LayoutMeasuringStrategy} from '@dnd-kit/core';
import {DndContext, MeasuringStrategy} from '@dnd-kit/core';

<DndContext layoutMeasuring={{strategy: LayoutMeasuringStrategy.Always}} />
<DndContext measuring={{strategy: MeasuringStrategy.Always}} />
```