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

feat: Add a stream interception to the onDragOver event #1801

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

githubobil
Copy link

The Question:
Calls when an element has been dropped into the grid from outside,The trigger frequency of ondragover events is too high, causing the problem of stuck
image

image

The Solution:
ondragover adds interception

The Effect
image

@github-actions github-actions bot added the deps use this label for changes in the project's dependencies label Nov 23, 2022
@STRML
Copy link
Collaborator

STRML commented Feb 24, 2023

Please don't commit package.json changes and built files.

@avasuro
Copy link

avasuro commented Mar 20, 2023

Please, keep in mind that inside onDragOver handler end user could do some actions to affect dnd process, e.g. apply e.dataTransfer.dropEffect, which affects visual look of mouse pointer, ability to dop (e.g. prevents drop if set to 'none') and could be used later in onDrop handler.

If onDragOver is throttled - dropEffect will be applied not immediately and this could produce bugs in end-user applications.

So, in my opinion only re-render of grid layout could be trottled to improve performance, but all DnD-related staff (like call of onDragOver handler etc.) should be handled immediately. In other way - there is very high risk of various DnD bugs for the end users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps use this label for changes in the project's dependencies infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants