Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dnd): add correct dragOverFromOutside behavior in week view #2616

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achrafl0
Copy link

@achrafl0 achrafl0 commented Jul 6, 2024

Hey,

This is an attempt to fix #2383.

The 2 issues I noticed were:

  • The selectors were listening to the wrong event ( dragOver instead of dragOverFromOutside )
  • The old dragOver code called the handleDrop which is not exactly true !

It's not breaking, as the old "dragOver" event was never emitted, so the code was never called (from my understanding)!

I'd love to have your feedback, and I'd be happy to add tests or better documentation if deemed necessary !

This is how it looks on the storybooks

Screen.Recording.2024-07-06.at.21.59.12.mov

@cutterbl
Copy link
Collaborator

@achrafl0 I have to pull this code down and run it myself, but a quick look at you changes looks good. Give me a day or two to make sure there are no adverse effects.

@cutterbl
Copy link
Collaborator

@achrafl0 The issue I'm seeing right now occurs within that same Storybook example. There is an item there which you should not be able to drop on the calendar ("Draggable but not for calendar"). In current master it respects that in the week and day views. Attempting to drop on the timegrid does nothing. With your code it actually shows the slot preview and creates an event on drop.

@matthiaseigner
Copy link
Contributor

Is there an update on this issue? We would also need the dragOver preview on the weeks view.

@cutterbl
Copy link
Collaborator

@matthiaseigner Just waiting on @achrafl0 to revise his PR for the feedback given.

cutterbl pushed a commit that referenced this pull request Sep 16, 2024
github-actions bot pushed a commit that referenced this pull request Sep 16, 2024
## [1.14.1](v1.14.0...v1.14.1) (2024-09-16)

### Bug Fixes

* **dnd:** added check for null dragFromOutsideItem, updated example ([#2651](#2651)) ([17e62a3](17e62a3)), closes [#2616](#2616) [#2383](#2383)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dragFromOutsideItem does not work in week view
3 participants