Open aenkirch opened 5 years ago
Also not working for me
Sorry but I doubt that. Because I tried with react@16.7.0 with the demo but it works. I doesn't have the same error message as yours (maybe because I installed react-dnd and react-dnd-html5-backend). But I feel it is more like Webpack configuration issue. Because I tried with the default Webpack configuration (comes along with react-script) and my own project Webpack configuration, and the first one works.
Quick debugging revealed that even if renderData
has data, and being mapped to resourceEventsList
successfully (mapped to React component object), the <tbody>
inside .scheduler-content-table
render empty content still. So I think there must be some compatibility issues between DnD drop target and React. React debug tool also shows empty content inside context.consumer
of dndContext
.
I experience the same issue when react-dnd is installed explicitly. The latest react-dnd version is 7.0.2, this package uses 5.0.0. So it's probably api changes / compatibility issues.
It does work with the 5.0.0 release with DragDropContextProvider wrapper.
I clone my latest repo locally in an empty folder, remove the package-lock.json, and update package.json:
"react": "^16.7.0",
"react-dnd": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"react-dom": "^16.7.0",
then npm install
and npm run example
, it works fine.
Then the problem should be in webpack.config.js
Can we append the configurations that work, I'm having the same issue, using JHipster
"react-jhipster": "0.7.0", "react-big-scheduler": "^0.2.4", "react-dnd": "^7.0.2", "react-dnd-html5-backend": "^7.0.2", "react-dom": "16.4.2",
This seems to be broke on latest react for sure. I see the drag source not rendering out.
Any updates about this? I have tried it with this: "react": "^16.8.3", "react-big-scheduler": "^0.2.6", "react-dnd": "^7.3.1", "react-dnd-html5-backend": "^7.2.0", "react-dom": "^16.8.3",
and it doesn't show events
I try all lates modules in demo - all ok, but on my main project it doesn't show events and doesn't create new event.
OK, so I've been looking into this, it's hairy!
I cloned the demo; React Big Scheduler Demo. There's a few interesting things here, but the big one is that react-dnd
and react-dnd-html5-backend
aren't actually in the package.json
.
npm install
on the demo worked fine and the demo runs, just like the online demo.
Then I tried npm ls react-dnd
and noticed that it's 5.0.0
, when I looked at my actual repo, there's 2 installs of react-dnd
: v5.0.0 as the RBS dependency and the latest version (7.something) due to my explicit requirement in my package.json
. When I removed my explicit requirement and the node_modules directory and then did a clean npm install
, I only ended up with 1 react-dnd
at v5.0.0 and my repo worked!
Obviously, there's breaking changes. Makes sense considering it's a major version upgrade. I think this package is fine how it is, it's not surprising that it breaks when a new major of react-dnd
is installed and this package correctly locks it to v5. That said, there's a new version of react-dnd
for a reason, so it'd be nice if this package used it...
Hi ! Already told the dev by email, but the project (at least the Demo version) says it require to import react-dnd and react-dnd-html5-backend when trying to update React version in the package.json file ! But when you do so : the events won't appear anymore in the scheduler...