From dfbd4ebd88852fdb5cc640e99e355495ede739f9 Mon Sep 17 00:00:00 2001 From: Patrick Strassmann Date: Tue, 11 Oct 2022 10:27:53 -0700 Subject: [PATCH] Update README.md DndContext's 'layoutMeasuring' prop was changed to 'measuring' --- api-documentation/context-provider/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api-documentation/context-provider/README.md b/api-documentation/context-provider/README.md index ad5d94c..a5bf5a0 100644 --- a/api-documentation/context-provider/README.md +++ b/api-documentation/context-provider/README.md @@ -61,7 +61,7 @@ interface Props { cancelDrop?: CancelDrop; children?: React.ReactNode; collisionDetection?: CollisionDetection; - layoutMeasuring?: Partial; + measuring?: MeasuringConfiguration; modifiers?: Modifiers; screenReaderInstructions?: ScreenReaderInstructions; sensors?: SensorDescriptor[]; @@ -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'; - + ```