-
Notifications
You must be signed in to change notification settings - Fork 48
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 for images #43
Comments
This was a bit laggy at first, but then started working beautifully, thank you! |
@a-drewsky do you have problem with the order after dragging? function onChange(sourceId, sourceIndex, targetIndex, targetId) {
const nextState = swap(items, sourceIndex, targetIndex)
setItems(nextState)
console.log('items', items)
} in this code I tried to see the state in console after dragging. The console will show the previous state now the after dragging. Any idea why ? |
Thanks! |
(I realize this comment is a bit old, but figured I'd answer anyways.) |
I don't know if this has been addressed but it took me an hour to figure out. If you want to use images in the grid items you have to add onDragStart={(e) => {e.preventDefault()}} to the img element.
The text was updated successfully, but these errors were encountered: