Minor Changes
-
6a59647Thanks @clauderic! - Allowplugins,sensors, andmodifiersto accept a function that receives the defaults, making it easy to extend or configure them without replacing the entire array.// Add a plugin alongside the defaults const manager = new DragDropManager({ plugins: (defaults) => [...defaults, MyPlugin], });
// Configure a default plugin in React <DragDropProvider plugins={(defaults) => [ ...defaults, Feedback.configure({dropAnimation: null}), ]} />
Previously, passing
plugins,sensors, ormodifierswould replace the defaults entirely, requiring consumers to import and spreaddefaultPreset. The function form receives the default values as an argument, so consumers can add, remove, or configure individual entries without needing to know or maintain the full default list.
Patch Changes
- Updated dependencies []:
- @dnd-kit/geometry@0.3.0
- @dnd-kit/state@0.3.0