Open
Conversation
019947c to
a342e61
Compare
Contributor
|
This does look much better! I'm not as familiar with the drag and drop api. How would you style the drag preview? |
jameskerr
reviewed
May 10, 2023
| node: NodeApi<T>; | ||
| tree: TreeApi<T>; | ||
| dragHandle?: (el: HTMLDivElement | null) => void; | ||
| previewHandle?: (el: HTMLDivElement | null) => void; |
Contributor
There was a problem hiding this comment.
How does this previewHandle get used?
Author
There was a problem hiding this comment.
it will be used in nodeRender, if user need. They can custom preview div ref.
such as :
<div ref={previewHandle}><dragImg ref={dragHandle} />im a test</div>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
One of the phenomena of Chrome browsers on Mac is that outside the DND range, the Drag or Drop event will be delayed by 250ms, because to play the animation, react-DND uses
preview(getEmptyImage());. Going to overlay causes a problem: it looks stutteringSo the default preview was removed, the default preview was changed to react-dnd's preview, and the preview interface was exposed
This feature only affects the default effect