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

Pass event to onDrop callback #1065

Merged
merged 1 commit into from
Nov 10, 2019

Conversation

grafficmedia
Copy link

@grafficmedia grafficmedia commented Nov 4, 2019

The onDrop callback is unusable in its current state. This PR will allow the user to retrieve the event that is passed to the onDrop callback such that they will be able to access the dataTransfer object to retrieve information about the gridItem they want to add to the layout.

Fixes issue #1058

Thanks for submitting a pull request to RGL!

Please reference an open issue. If one has not been created, please create one along with a failing
example or test case.

Please do not commit built files (/dist) to pull requests. They are built only at release.

@grafficmedia grafficmedia changed the title Pass event to onDrop callback Pass event to onDrop callback (#1058) Nov 4, 2019
@grafficmedia grafficmedia changed the title Pass event to onDrop callback (#1058) Pass event to onDrop callback Nov 4, 2019
@n1ghtmare n1ghtmare requested a review from daynin November 7, 2019 08:59
Copy link
Collaborator

@n1ghtmare n1ghtmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @daynin can you confirm from your end, please?

@n1ghtmare n1ghtmare merged commit d772b2f into react-grid-layout:master Nov 10, 2019
@sulihuang
Copy link

@n1ghtmare @Jacob-Grafenstein I would like to ask in which version will complete the repair of this feature, I am using version 0.17.1, still can not use onDrop callback

@n-dragon
Copy link

@n1ghtmare any idea of date for the next release ?

@raymond-ong
Copy link

I'm also hoping that the "new" layout will be passed as a parameter of OnDrop (the state.layout object inside ReactGridLayout.js).

@grafficmedia
Copy link
Author

@sulihuang great question, I would also like to see this feature released. I am not a part of the project, just a good citizen who fixed an issue. @STRML This would greatly increase adoption of the drag and drop feature of RGL. Any idea when we might see a release?

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.

5 participants