clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
13.31k stars 658 forks source link

Layout measuring documentation is outdated #830

Open hexwit opened 2 years ago

hexwit commented 2 years ago

The page https://docs.dndkit.com/api-documentation/context-provider has a section about layout measuring. But code sample presented there doesn't work in "@dnd-kit/core": "^6.0.5". Sample provided:

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

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

Actual code used in story book:

 <DndContext
      measuring={{
        droppable: {
          strategy: MeasuringStrategy.Always,
        },
      }}
.....

Am I missing something, or documentation is outdated?

williamyeny commented 2 years ago

It is outdated. I recommend just reading the source for now.

williamyeny commented 2 years ago

This CHANGELOG describes the differences