StephenChou1017 / react-big-scheduler

A scheduler and resource planning component built for React and made for modern browsers (IE10+)
https://stephenchou1017.github.io/scheduler/#/
MIT License
754 stars 414 forks source link

Drag and Drop Errors #200

Open ashfaq-ahmed opened 4 years ago

ashfaq-ahmed commented 4 years ago

I have enabled drag and drop for the scheduler where I can drop external events into the scheduler. But sometimes I start getting hundreds of errors in the console while dragging the event. I even see these when dragging an internal event (that is already created) to another box. I also checked the official demo of drag and drop, while dragging, if we enter the calendar from left, we get the same errors.

DnDContext.js:85 Uncaught TypeError: Cannot read property 'start' of undefined
    at Object.hover (DnDContext.js:85)
    at TargetImpl.hover (createTargetFactory.js:30)
    at hoverAllTargets (hover.js:57)
    at DragDropManagerImpl.hover (hover.js:16)
    at Object.hover (DragDropManagerImpl.js:65)
    at HTML5Backend.handleTopDragOver (HTML5Backend.js:215)

The external events, while dragging, when I enter the calendar from top, it works fine, but when I enter the calendar from either right or left, I start getting hundreds of these errors.

darryl1975 commented 4 years ago

Hi Stephen,

I have also encountered a similar error: 29DnDContext.js:85 Uncaught TypeError: Cannot read property 'start' of undefined at Object.hover (DnDContext.js:85) at TargetImpl.hover (createTargetFactory.js:30) at hoverAllTargets (hover.js:57) at DragDropManagerImpl.hover (hover.js:16) at Object.hover (DragDropManagerImpl.js:65) at HTML5Backend.handleTopDragOver (HTML5Backend.js:215)

My plugin version as follows: react-big-scheduler@0.2.7 react-dnd-html5-backend@7.7.0 react-dnd@7.7.0 react@16.3.1

I m not sure how to solve this. But it's urgent. Please kindly advise and help.

appreciate. Thank you.

despatates commented 4 years ago

Hi,

This issue has been fixed by https://github.com/StephenChou1017/react-big-scheduler/pull/169. But the npm package is outdated (last updated in May 2019, fix merged in December 2019).

What you can do (and what I did) is to fork the repo and create a new build embedding the latest commits (with npm run build).