Comments (4)
For me the issue was that when my IDE (WebStorm) added the import automatically it got imported as:
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
while the correct import should be:
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
It might still require the same fix however it took me an embarrassing long time to realize the import path was wrong.
from pragmatic-drag-and-drop.
To add some further examples where VSCode by default imported from incorrect paths:
import { Instruction, ItemMode } from '@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/tree-item';
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/dist/types/adapter/element-adapter';
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/dist/types/entry-point/element/pointer-outside-of-preview';
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/dist/types/entry-point/element/set-custom-native-drag-preview';
import { combine } from '@atlaskit/pragmatic-drag-and-drop/dist/types/public-utils/combine';
Should instead be:
import { Instruction, ItemMode } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
from pragmatic-drag-and-drop.
cc @ReDrUm
from pragmatic-drag-and-drop.
👋 Thank you for raising this.
- We plan on adding
exports
to all packages soon - It looks like you have got yourself unstuck for now with
patch-package
, which is awesome - I was unable to replicate your issue 🤔
Standalone vite demo on Stackblitz
vite/5.2.8 linux-x64 node-v18.18.0
from pragmatic-drag-and-drop.
Related Issues (20)
- Vertical trees HOT 3
- Inconsistent drag preview opacity HOT 3
- Drag issue when dragging *new* item onto a tree. HOT 7
- Adapter: Element adapter link in documentation broken. HOT 3
- Absence of handling events in capture phase: Design decision or just current scope? HOT 1
- TypeScript: Cannot find module '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter' HOT 2
- In desktop Safari drag preview can include elements behind container. HOT 7
- canDrop = false not working on tree root element HOT 5
- Making a next.js Link element draggable. HOT 1
- support drag and drop inside iframe HOT 1
- Feature: Make tree hitbox zones configurable
- Making an element draggable prevents user from highlighting and copying text content inside the element HOT 4
- Can't detect drag from external inside `textarea` HOT 6
- Drag and drop does not work in Chrome dev tools device mode HOT 1
- dynamic-table - Is there any plan to support to react 18?
- Mouse Pointer Stuck to Top Left in Drag Preview Despite Using `preserveOffsetOnSource` Utility HOT 3
- { source } is not ready on canDrop, onDrag in dropTargetForExternal
- Changelog / Release notes? HOT 2
- How to determine the distance from the edge of the container in a drop event?
- Bug: Safari Autoscroll Offset HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pragmatic-drag-and-drop.